summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-13 13:23:39 -0500
committerGitHub <noreply@github.com>2017-02-13 13:23:39 -0500
commit67dd6c1ec6e53923eef892c15a59cc269e9db037 (patch)
tree84738fcb28d99541c28d7692631851ef77f20879 /app/channel.go
parent0a21eed0048ec76fce07b688ddce60719358f34d (diff)
downloadchat-67dd6c1ec6e53923eef892c15a59cc269e9db037.tar.gz
chat-67dd6c1ec6e53923eef892c15a59cc269e9db037.tar.bz2
chat-67dd6c1ec6e53923eef892c15a59cc269e9db037.zip
Fix unread error (#5390)
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go2
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)
}
}