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
+5 -1
View File
@@ -219,7 +219,11 @@ class Project extends AbstractModel
'userid' => $userid,
], [
'important' => 1
]);
], function () use ($userid) {
return [
'bot' => User::isBot($userid) ? 1 : 0,
];
});
}
WebSocketDialogUser::whereDialogId($this->dialog_id)->whereNotIn('userid', $userids)->whereImportant(1)->remove();
});