diff options
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) }() } |