From 22fa48f455f15be7a7528501431841a2c7d84c85 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Mon, 31 Jul 2017 06:18:40 -0600 Subject: Don't send last view message for null channels (#7051) --- app/channel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/channel.go') 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) -- cgit v1.2.3-1-g7c22