diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-11-14 07:09:41 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-11-14 07:09:41 -0500 |
commit | 323ce8b203c570ed6a1dd57b44d6637ad8207616 (patch) | |
tree | efc3c61b905244bdb0e1ace0ce9f5ae4876644ad /api/web_hub.go | |
parent | d1207d34c1d99eba9ebf85c98d267ee7e955ea7d (diff) | |
parent | b55ec6148caa93d54b660afe55408c643d217108 (diff) | |
download | chat-323ce8b203c570ed6a1dd57b44d6637ad8207616.tar.gz chat-323ce8b203c570ed6a1dd57b44d6637ad8207616.tar.bz2 chat-323ce8b203c570ed6a1dd57b44d6637ad8207616.zip |
Merge branch 'release-3.5'
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) { |