Refactored post handling/updating on both the client and server.
Этот коммит содержится в:
@@ -121,6 +121,11 @@ func (c *WebConn) writePump() {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *WebConn) updateChannelAccessCache(channelId string) {
|
||||
allowed := hasPermissionsToChannel(Srv.Store.Channel().CheckPermissionsTo(c.TeamId, channelId, c.UserId))
|
||||
c.ChannelAccessCache[channelId] = allowed
|
||||
}
|
||||
|
||||
func hasPermissionsToChannel(sc store.StoreChannel) bool {
|
||||
if cresult := <-sc; cresult.Err != nil {
|
||||
return false
|
||||
|
||||
Ссылка в новой задаче
Block a user