From 5ffe27de8df1a70b4be3b9603fa0693bcafe973d Mon Sep 17 00:00:00 2001 From: enahum Date: Tue, 6 Sep 2016 09:23:11 -0300 Subject: [PATCH] PLT-4027 "Added to the channel" system messages mark the channel as Unread (#3947) --- store/sql_post_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/sql_post_store.go b/store/sql_post_store.go index 6293083161..3b7e9d97a3 100644 --- a/store/sql_post_store.go +++ b/store/sql_post_store.go @@ -73,7 +73,7 @@ func (s SqlPostStore) Save(post *model.Post) StoreChannel { } else { time := model.GetMillis() - if post.Type != model.POST_JOIN_LEAVE { + if post.Type != model.POST_JOIN_LEAVE && post.Type != model.POST_ADD_REMOVE { s.GetMaster().Exec("UPDATE Channels SET LastPostAt = :LastPostAt, TotalMsgCount = TotalMsgCount + 1 WHERE Id = :ChannelId", map[string]interface{}{"LastPostAt": time, "ChannelId": post.ChannelId}) } else { // don't update TotalMsgCount for unimportant messages so that the channel isn't marked as unread