diff options
Diffstat (limited to 'api/web_hub.go')
-rw-r--r-- | api/web_hub.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/api/web_hub.go b/api/web_hub.go index e59521879..b607703f2 100644 --- a/api/web_hub.go +++ b/api/web_hub.go @@ -112,6 +112,7 @@ func InvalidateCacheForUser(userId string) { func InvalidateCacheForUserSkipClusterSend(userId string) { Srv.Store.Channel().InvalidateAllChannelMembersForUser(userId) + Srv.Store.User().InvalidateProfilesInChannelCacheByUser(userId) GetHubForUserId(userId).InvalidateUser(userId) } @@ -119,9 +120,9 @@ func InvalidateCacheForUserSkipClusterSend(userId string) { func (h *Hub) Register(webConn *WebConn) { h.register <- webConn - msg := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_HELLO, "", "", webConn.UserId, nil) - msg.Add("server_version", fmt.Sprintf("%v.%v.%v", model.CurrentVersion, model.BuildNumber, utils.CfgHash)) - go Publish(msg) + if webConn.isAuthenticated() { + webConn.SendHello() + } } func (h *Hub) Unregister(webConn *WebConn) { |