MM-22265 - Restrict the WS "update_team" event broadcast (#13848)
Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c6e7030e03
Коммит
fb4d27d596
@@ -252,7 +252,12 @@ func (a *App) sendTeamEvent(team *model.Team, event string) {
|
||||
*sanitizedTeam = *team
|
||||
sanitizedTeam.Sanitize()
|
||||
|
||||
message := model.NewWebSocketEvent(event, "", "", "", nil)
|
||||
teamId := "" // no filtering by teamId by default
|
||||
if event == model.WEBSOCKET_EVENT_UPDATE_TEAM {
|
||||
// in case of update_team event - we send the message only to members of that team
|
||||
teamId = team.Id
|
||||
}
|
||||
message := model.NewWebSocketEvent(event, teamId, "", "", nil)
|
||||
message.Add("team", sanitizedTeam.ToJson())
|
||||
a.Publish(message)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user