diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index a4d7a4ac9..d2da1f448 100755 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -629,11 +629,12 @@ class UsersController extends AbstractController User::auth(); // $type = trim(Request::input('type')); - if (!UserBot::systemBotName($type)) { + $botName = "ai-{$type}"; + if (!UserBot::systemBotName($botName)) { return Base::retError('AI机器人不存在'); } // - $botUser = User::botGetOrCreate("ai-{$type}"); + $botUser = User::botGetOrCreate($botName); if (empty($botUser)) { return Base::retError('AI机器人不存在'); }