fix: 对 AI小班长 等系统虚拟角色豁免警告时的在线状态校验
This commit is contained in:
@@ -614,6 +614,11 @@ class AdminCommandController extends Controller
|
||||
*/
|
||||
private function authorizeTargetOnlineInRoom(int $roomId, string $targetUsername): array
|
||||
{
|
||||
// 系统虚拟机器人账号豁免在线状态校验,允许测试与交互警告
|
||||
if (in_array($targetUsername, ['AI小班长', '星海小博士'])) {
|
||||
return ['ok' => true, 'message' => '校验通过'];
|
||||
}
|
||||
|
||||
if (! $this->chatState->isUserInRoom($roomId, $targetUsername)) {
|
||||
return ['ok' => false, 'message' => '目标用户不在当前房间,无法执行该操作'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user