MM-37896: thread recency when updating a post (#18363)

When a post is edited we should not update the thread recency
(LastReplyAt).
This commit is contained in:
Kyriakos Z
2021-09-17 16:01:41 +03:00
committed by GitHub
parent a9101d62a6
commit 237e4fd531

View File

@@ -357,7 +357,6 @@ func (s *SqlPostStore) Update(newPost *model.Post, oldPost *model.Post) (*model.
if newPost.RootId != "" {
s.GetMaster().Exec("UPDATE Posts SET UpdateAt = :UpdateAt WHERE Id = :RootId AND UpdateAt < :UpdateAt", map[string]interface{}{"UpdateAt": time, "RootId": newPost.RootId})
s.GetMaster().Exec("UPDATE Threads SET LastReplyAt = :UpdateAt WHERE PostId = :RootId", map[string]interface{}{"UpdateAt": time, "RootId": newPost.RootId})
}
// mark the old post as deleted