[MM-60083] export: do not export DMs/GMs if users are deleted (#28854)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
09add85a51
Коммит
e76786278b
@@ -2327,12 +2327,15 @@ func (a *App) importMultipleDirectPostLines(rctx request.CTX, lines []imports.Li
|
||||
return line.LineNumber, model.NewAppError("BulkImport", "app.import.import_direct_post.create_direct_channel.error", nil, "", http.StatusBadRequest).Wrap(err)
|
||||
}
|
||||
channel = ch
|
||||
} else {
|
||||
} else if len(userIDs) > 2 {
|
||||
ch, err = a.createGroupChannel(rctx, userIDs)
|
||||
if err != nil && err.Id != store.ChannelExistsError {
|
||||
return line.LineNumber, model.NewAppError("BulkImport", "app.import.import_direct_post.create_group_channel.error", nil, "", http.StatusBadRequest).Wrap(err)
|
||||
}
|
||||
channel = ch
|
||||
} else {
|
||||
rctx.Logger().Warn("Not enough users to create a direct channel", mlog.Int("line_number", line.LineNumber))
|
||||
continue
|
||||
}
|
||||
|
||||
user := users[strings.ToLower(*line.DirectPost.User)]
|
||||
|
||||
Ссылка в новой задаче
Block a user