mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
fix: 修复AI机器人不存在的情况
This commit is contained in:
parent
06db036e4a
commit
59b29014d9
@ -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机器人不存在');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user