summaryrefslogtreecommitdiffstats
path: root/model/post.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-08-27 15:07:39 -0400
committerJoramWilander <jwawilander@gmail.com>2015-08-27 15:07:39 -0400
commitcf58f958544b14a83f6759d45b9be0eeec8556b5 (patch)
treec4265e76447dfb7875bda8e4af463ac477977235 /model/post.go
parentdb7e8c12889485234fb2d1ba6556106e5fc7548b (diff)
downloadchat-cf58f958544b14a83f6759d45b9be0eeec8556b5.tar.gz
chat-cf58f958544b14a83f6759d45b9be0eeec8556b5.tar.bz2
chat-cf58f958544b14a83f6759d45b9be0eeec8556b5.zip
Force fresh timestamp for CreateAt field of Posts before saving to DB.
Diffstat (limited to 'model/post.go')
-rw-r--r--model/post.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/model/post.go b/model/post.go
index f8a3032a3..0c035d4e7 100644
--- a/model/post.go
+++ b/model/post.go
@@ -120,9 +120,7 @@ func (o *Post) PreSave() {
o.OriginalId = ""
- if o.CreateAt <= 0 {
- o.CreateAt = GetMillis()
- }
+ o.CreateAt = GetMillis()
o.UpdateAt = o.CreateAt
if o.Props == nil {