Fix user_added websocket event and update websocket channel access cache on add/remove member.
Этот коммит содержится в:
@@ -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)
|
||||
}()
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user