fix: 全员群禁言仅管理员可发言无效的问题

This commit is contained in:
kuaifan
2023-07-04 11:59:26 +08:00
parent 13560616c8
commit 0adbdbdf1b
2 changed files with 7 additions and 5 deletions

View File

@@ -389,7 +389,7 @@ class WebSocketDialog extends AbstractModel
case 'all':
throw new ApiException('当前会话全员禁言');
case 'user':
if (!User::find($userid)?->checkAdmin()) {
if (!User::find($userid)?->isAdmin()) {
throw new ApiException('当前会话禁言');
}
}