diff options
author | Corey Hulen <corey@hulen.com> | 2015-10-07 09:30:01 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-10-07 09:30:01 -0700 |
commit | 3c859aebde2e9e11e8b1eeb4d8bb300400b4ad54 (patch) | |
tree | e392637ecffed4e761ad5c59e4d6472e998132e6 /api/web_hub.go | |
parent | 5ac1a58063b9302f2ed88af2bbed0be850aa1666 (diff) | |
parent | 1421e1ec4aa09c0e7094643d342d095cdd91d506 (diff) | |
download | chat-3c859aebde2e9e11e8b1eeb4d8bb300400b4ad54.tar.gz chat-3c859aebde2e9e11e8b1eeb4d8bb300400b4ad54.tar.bz2 chat-3c859aebde2e9e11e8b1eeb4d8bb300400b4ad54.zip |
Merge pull request #961 from mattermost/plt-471
PLT-471 Fix user_added websocket event
Diffstat (limited to 'api/web_hub.go')
-rw-r--r-- | api/web_hub.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/api/web_hub.go b/api/web_hub.go index 44d405283..15528c612 100644 --- a/api/web_hub.go +++ b/api/web_hub.go @@ -30,11 +30,15 @@ func PublishAndForget(message *model.Message) { }() } +func UpdateChannelAccessCache(teamId, userId, channelId string) { + if nh, ok := hub.teamHubs[teamId]; ok { + nh.UpdateChannelAccessCache(userId, channelId) + } +} + func UpdateChannelAccessCacheAndForget(teamId, userId, channelId string) { go func() { - if nh, ok := hub.teamHubs[teamId]; ok { - nh.UpdateChannelAccessCache(userId, channelId) - } + UpdateChannelAccessCache(teamId, userId, channelId) }() } |