diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-09-15 06:56:08 -0400 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-09-15 11:56:08 +0100 |
commit | 600beb5af3e35fd82a2b06995b67629d08fe0fe3 (patch) | |
tree | 1bb4b6b99420aff52c1efec5631f3094a927c2a9 /app/channel.go | |
parent | b6fb98a43176215f16fc52b64abebde51355e5c1 (diff) | |
download | chat-600beb5af3e35fd82a2b06995b67629d08fe0fe3.tar.gz chat-600beb5af3e35fd82a2b06995b67629d08fe0fe3.tar.bz2 chat-600beb5af3e35fd82a2b06995b67629d08fe0fe3.zip |
Add some checking of channel ID before sending websocket event (#7431)
Diffstat (limited to 'app/channel.go')
-rw-r--r-- | app/channel.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/channel.go b/app/channel.go index fa9ac08ef..e7025633f 100644 --- a/app/channel.go +++ b/app/channel.go @@ -1168,7 +1168,7 @@ func (a *App) ViewChannel(view *model.ChannelView, userId string, clearPushNotif return result.Err } - if *utils.Cfg.ServiceSettings.EnableChannelViewedMessages && len(view.ChannelId) > 0 { + if *utils.Cfg.ServiceSettings.EnableChannelViewedMessages && model.IsValidId(view.ChannelId) { message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_VIEWED, "", "", userId, nil) message.Add("channel_id", view.ChannelId) go Publish(message) |