[MM-16501] Delete user from Bot table when deleting user with… (#11425)
* Add bot store PermanentDelete() method to PermanentDeleteUser method * Test the that bot is deleted from bots table after user is deleted from users table. Notes GetBots() method on bots store cannot be used to get and compare bots from before and after the PermanentDeleteUser() call. Had to directly query the Bots table.
Этот коммит содержится в:
@@ -1426,6 +1426,10 @@ func (a *App) PermanentDeleteUser(user *model.User) *model.AppError {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := a.Srv.Store.Bot().PermanentDelete(user.Id); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
infos, err := a.Srv.Store.FileInfo().GetForUser(user.Id)
|
||||
if err != nil {
|
||||
mlog.Warn("Error getting file list for user from FileInfoStore")
|
||||
|
||||
Ссылка в новой задаче
Block a user