summaryrefslogtreecommitdiffstats
path: root/api/web_conn.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-04-27 16:05:39 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-04-27 16:05:39 -0400
commit7695cbd1b4a62b1cc7c31b16f70309a287296385 (patch)
tree15a7f35bb56f0c72a9c13192380d795a48339d48 /api/web_conn.go
parentada513a0146cfb570e3614f9b26c0465de3a1d94 (diff)
downloadchat-7695cbd1b4a62b1cc7c31b16f70309a287296385.tar.gz
chat-7695cbd1b4a62b1cc7c31b16f70309a287296385.tar.bz2
chat-7695cbd1b4a62b1cc7c31b16f70309a287296385.zip
Add websocket event and cache invalidation for deleting channels (#2807)
Diffstat (limited to 'api/web_conn.go')
-rw-r--r--api/web_conn.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/web_conn.go b/api/web_conn.go
index 397af0696..21b6f5b91 100644
--- a/api/web_conn.go
+++ b/api/web_conn.go
@@ -118,6 +118,10 @@ func (c *WebConn) InvalidateCache() {
c.hasPermissionsToTeam = make(map[string]bool)
}
+func (c *WebConn) InvalidateCacheForChannel(channelId string) {
+ delete(c.hasPermissionsToChannel, channelId)
+}
+
func (c *WebConn) HasPermissionsToTeam(teamId string) bool {
perm, ok := c.hasPermissionsToTeam[teamId]
if !ok {