summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-07-31 06:18:40 -0600
committerJoram Wilander <jwawilander@gmail.com>2017-07-31 08:18:40 -0400
commit22fa48f455f15be7a7528501431841a2c7d84c85 (patch)
treec81ff18975bc83b7ba2af1a7051a8c2e61b2794e /app/channel.go
parent860f2c8332f34d02e53ea1460decb4d1490bcbd4 (diff)
downloadchat-22fa48f455f15be7a7528501431841a2c7d84c85.tar.gz
chat-22fa48f455f15be7a7528501431841a2c7d84c85.tar.bz2
chat-22fa48f455f15be7a7528501431841a2c7d84c85.zip
Don't send last view message for null channels (#7051)
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 9f8d20419..b077c0399 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -1166,7 +1166,7 @@ func ViewChannel(view *model.ChannelView, userId string, clearPushNotifications
return result.Err
}
- if *utils.Cfg.ServiceSettings.EnableChannelViewedMessages {
+ if *utils.Cfg.ServiceSettings.EnableChannelViewedMessages && len(view.ChannelId) > 0 {
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_VIEWED, "", "", userId, nil)
message.Add("channel_id", view.ChannelId)
go Publish(message)