summaryrefslogtreecommitdiffstats
path: root/store/sql_post_store.go
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-09-06 09:23:11 -0300
committerJoram Wilander <jwawilander@gmail.com>2016-09-06 08:23:11 -0400
commit5ffe27de8df1a70b4be3b9603fa0693bcafe973d (patch)
treeb81b880582274621039af1472c58364cb7b40141 /store/sql_post_store.go
parent6e0c3605fbe1d0101c8a89fca7b15faaeb98440c (diff)
downloadchat-5ffe27de8df1a70b4be3b9603fa0693bcafe973d.tar.gz
chat-5ffe27de8df1a70b4be3b9603fa0693bcafe973d.tar.bz2
chat-5ffe27de8df1a70b4be3b9603fa0693bcafe973d.zip
PLT-4027 "Added to the channel" system messages mark the channel as Unread (#3947)
Diffstat (limited to 'store/sql_post_store.go')
-rw-r--r--store/sql_post_store.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go
index 629308316..3b7e9d97a 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