fix: 修复机器人发送消息接口

This commit is contained in:
kuaifan 2025-07-16 22:36:49 +08:00
parent 2fe28d2335
commit d1f00b2d48

View File

@ -1642,6 +1642,16 @@ class DialogController extends AbstractController
return Base::retError('消息内容最大不能超过2000字');
}
//
if (!in_array($botType, [
'system-msg',
'task-alert',
'check-in',
'approval-alert',
'meeting-alert',
'bot-manager',
])) {
return Base::retError('机器人类型错误');
}
$botUser = User::botGetOrCreate($botType);
if (empty($botUser)) {
return Base::retError('机器人不存在');