diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-08-26 12:09:01 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-08-27 08:21:26 -0400 |
commit | 041d89b85a22b0a498a4176d0d26fd5dc84c33f9 (patch) | |
tree | 37cc2ca9252b45f6f30ba4e88037a67a700ec0ad /api/web_hub.go | |
parent | 8356e25f80bbba3040ceeda5732b8843b8e493c1 (diff) | |
download | chat-041d89b85a22b0a498a4176d0d26fd5dc84c33f9.tar.gz chat-041d89b85a22b0a498a4176d0d26fd5dc84c33f9.tar.bz2 chat-041d89b85a22b0a498a4176d0d26fd5dc84c33f9.zip |
Refactored post handling/updating on both the client and server.
Diffstat (limited to 'api/web_hub.go')
-rw-r--r-- | api/web_hub.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/api/web_hub.go b/api/web_hub.go index c7be19cac..44d405283 100644 --- a/api/web_hub.go +++ b/api/web_hub.go @@ -30,6 +30,14 @@ func PublishAndForget(message *model.Message) { }() } +func UpdateChannelAccessCacheAndForget(teamId, userId, channelId string) { + go func() { + if nh, ok := hub.teamHubs[teamId]; ok { + nh.UpdateChannelAccessCache(userId, channelId) + } + }() +} + func (h *Hub) Register(webConn *WebConn) { h.register <- webConn } |