summaryrefslogtreecommitdiffstats
path: root/api/web_conn.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/web_conn.go')
-rw-r--r--api/web_conn.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/api/web_conn.go b/api/web_conn.go
index 3b991d449..2f5036922 100644
--- a/api/web_conn.go
+++ b/api/web_conn.go
@@ -200,13 +200,8 @@ func (webCon *WebConn) ShouldSendEvent(msg *model.WebSocketEvent) bool {
// Only broadcast typing messages if less than 1K people in channel
if msg.Event == model.WEBSOCKET_EVENT_TYPING {
- if result := <-Srv.Store.Channel().GetMemberCount(msg.Broadcast.ChannelId, true); result.Err != nil {
- l4g.Error("webhub.shouldSendEvent: " + result.Err.Error())
+ if Srv.Store.Channel().GetMemberCountFromCache(msg.Broadcast.ChannelId) > *utils.Cfg.TeamSettings.MaxNotificationsPerChannel {
return false
- } else {
- if result.Data.(int64) > *utils.Cfg.TeamSettings.MaxNotificationsPerChannel {
- return false
- }
}
}