Update createdDate to the current timestamp when publishing new post

This commit is contained in:
Angelo Stavrow 2021-02-08 16:14:02 -05:00
parent 6cc2194b26
commit be625c7822
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -97,7 +97,7 @@ extension WriteFreelyModel {
appearance: post.appearance,
language: post.language,
rtl: post.rtl,
createdDate: post.createdDate
createdDate: post.status == PostStatus.local.rawValue ? Date() : post.createdDate
)
if let existingPostId = post.postId {