Don't send last view message for null channels (#7051)

Этот коммит содержится в:
Corey Hulen
2017-07-31 06:18:40 -06:00
коммит произвёл Joram Wilander
родитель 860f2c8332
Коммит 22fa48f455

Просмотреть файл

@@ -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)