perf: 群聊总人数排除机器人

This commit is contained in:
kuaifan
2025-01-02 13:41:09 +08:00
parent 5f87067a75
commit be9a968ad9
5 changed files with 76 additions and 5 deletions

View File

@@ -423,7 +423,11 @@ class WebSocketDialog extends AbstractModel
WebSocketDialogUser::updateInsert([
'dialog_id' => $this->id,
'userid' => $value,
], $updateData, [], $isInsert);
], $updateData, function() use ($value) {
return [
'bot' => User::isBot($value) ? 1 : 0,
];
}, $isInsert);
if ($isInsert) {
WebSocketDialogMsg::sendMsg(null, $this->id, 'notice', [
'notice' => User::userid2nickname($value) . " 已加入群组"