Removing typing check for 3.6 (#5584)

This commit is contained in:
Corey Hulen
2017-03-01 14:15:08 -05:00
committed by GitHub
parent fa8b637062
commit 82e75d1d72
-19
View File
@@ -90,14 +90,6 @@ func HubUnregister(webConn *WebConn) {
func Publish(message *model.WebSocketEvent) {
if SkipTypingMessage(message) {
if metrics := einterfaces.GetMetricsInterface(); metrics != nil {
metrics.IncrementWebsocketEvent(message.Event + "_skipped")
}
return
}
if metrics := einterfaces.GetMetricsInterface(); metrics != nil {
metrics.IncrementWebsocketEvent(message.Event)
}
@@ -325,14 +317,3 @@ func (h *Hub) Start() {
go doRecoverableStart()
}
func SkipTypingMessage(msg *model.WebSocketEvent) bool {
// Only broadcast typing messages if less than 1K people in channel
if msg.Event == model.WEBSOCKET_EVENT_TYPING {
if Srv.Store.Channel().GetMemberCountFromCache(msg.Broadcast.ChannelId) > *utils.Cfg.TeamSettings.MaxNotificationsPerChannel {
return true
}
}
return false
}