Set OwnerId for bots created via EnsureBotUser (#21560)

Этот коммит содержится в:
Ben Schumacher
2022-11-03 06:31:38 +01:00
коммит произвёл GitHub
родитель a541cda9d0
Коммит a4103f8c77
2 изменённых файлов: 28 добавлений и 17 удалений

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

@@ -1018,6 +1018,9 @@ func (api *PluginAPI) PermanentDeleteBot(userID string) *model.AppError {
}
func (api *PluginAPI) EnsureBotUser(bot *model.Bot) (string, error) {
// Bots created by a plugin should use the plugin's ID for the creator field.
bot.OwnerId = api.id
return api.app.EnsureBot(api.ctx, api.id, bot)
}