feat: 优化用户机器人 webhook 逻辑

This commit is contained in:
nightcp
2025-10-21 13:53:16 +08:00
parent 9b2731607b
commit 98e4668969
5 changed files with 21 additions and 12 deletions

View File

@@ -1280,6 +1280,9 @@ class DialogController extends AbstractController
if ($model_name) {
$msgData['model_name'] = $model_name;
}
if (User::isBot($user->userid)) {
$msgData['force_webhook'] = true; // 强制使用webhook发送
}
$result = WebSocketDialogMsg::sendMsg($action, $dialog_id, 'text', $msgData, $user->userid, false, false, $silence, $key);
}
}