summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
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)