fix: 修复账号被禁用之后还能收到推送和邮件

This commit is contained in:
kuaifan 2024-11-22 16:50:13 +08:00
parent bcc7d6d35c
commit 88aee1e3bf
2 changed files with 2 additions and 1 deletions

View File

@ -124,7 +124,7 @@ class EmailNoticeTask extends AbstractTask
private function sendUserEmail(int $userId, string $dialogType, Carbon $startTime, Carbon $endTime): void
{
// 验证用户
$user = User::find($userId);
$user = User::whereDisableAt(null)->find($userId);
if (!$user || $user->bot || !is_null($user->disable_at) || !Base::isEmail($user->email)) {
return;
}

View File

@ -191,6 +191,7 @@ class WebSocketDialogMsgTask extends AbstractTask
}
$langs = User::select(['userid', 'lang'])
->whereIn('userid', $umengUserid)
->whereDisableAt(null)
->get()
->groupBy('lang')
->map(function($group) {