[MM-58745] export/import: enable exporting and importing bots canonically (#28214)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3049191e2f
Коммит
f41d2d7774
@@ -177,6 +177,19 @@ func ImportLineFromUser(user *model.User, exportedPrefs map[string]*string) *imp
|
||||
}
|
||||
}
|
||||
|
||||
func ImportLineFromBot(bot *model.Bot, ownerUsername string) *imports.LineImportData {
|
||||
return &imports.LineImportData{
|
||||
Type: "bot",
|
||||
Bot: &imports.BotImportData{
|
||||
Username: &bot.Username,
|
||||
Owner: &ownerUsername,
|
||||
DisplayName: &bot.DisplayName,
|
||||
Description: &bot.Description,
|
||||
DeleteAt: &bot.DeleteAt,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func ImportUserTeamDataFromTeamMember(member *model.TeamMemberForExport) *imports.UserTeamImportData {
|
||||
rolesList := strings.Fields(member.Roles)
|
||||
if member.SchemeAdmin {
|
||||
|
||||
Ссылка в новой задаче
Block a user