diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-02-13 13:23:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 13:23:39 -0500 |
commit | 67dd6c1ec6e53923eef892c15a59cc269e9db037 (patch) | |
tree | 84738fcb28d99541c28d7692631851ef77f20879 | |
parent | 0a21eed0048ec76fce07b688ddce60719358f34d (diff) | |
download | chat-67dd6c1ec6e53923eef892c15a59cc269e9db037.tar.gz chat-67dd6c1ec6e53923eef892c15a59cc269e9db037.tar.bz2 chat-67dd6c1ec6e53923eef892c15a59cc269e9db037.zip |
Fix unread error (#5390)
-rw-r--r-- | app/channel.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/channel.go b/app/channel.go index 194a43f69..ab832693f 100644 --- a/app/channel.go +++ b/app/channel.go @@ -858,7 +858,7 @@ func ViewChannel(view *model.ChannelView, teamId string, userId string, clearPus if len(view.PrevChannelId) > 0 { channelIds = append(channelIds, view.PrevChannelId) - if *utils.Cfg.EmailSettings.SendPushNotifications && clearPushNotifications { + if *utils.Cfg.EmailSettings.SendPushNotifications && clearPushNotifications && len(view.ChannelId) > 0 { pchan = Srv.Store.User().GetUnreadCountForChannel(userId, view.ChannelId) } } |