[MM-62004] update threads after a channel gets moved (#29624)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2025-02-07 16:20:13 +01:00
коммит произвёл GitHub
родитель 3aaa379687
Коммит a3f22bd349
8 изменённых файлов: 247 добавлений и 0 удалений

Просмотреть файл

@@ -3276,6 +3276,11 @@ func (a *App) MoveChannel(c request.CTX, team *model.Team, channel *model.Channe
}
}
// Update the threads within this channel to the new team
if err := a.Srv().Store().Thread().UpdateTeamIdForChannelThreads(channel.Id, team.Id); err != nil {
c.Logger().Warn("error while updating threads after channel move", mlog.Err(err))
}
if err := a.RemoveUsersFromChannelNotMemberOfTeam(c, user, channel, team); err != nil {
c.Logger().Warn("error while removing non-team member users", mlog.Err(err))
}