fix(wechat): 屏蔽无人参与的百家乐空局通知,防止无效消息刷屏群聊
This commit is contained in:
@@ -225,10 +225,12 @@ class CloseBaccaratRoundJob implements ShouldQueue
|
|||||||
broadcast(new MessageSent(1, $msg));
|
broadcast(new MessageSent(1, $msg));
|
||||||
SaveMessageJob::dispatch($msg);
|
SaveMessageJob::dispatch($msg);
|
||||||
|
|
||||||
// 触发微信机器人消息推送 (百家乐结果)
|
// 触发微信机器人消息推送 (百家乐结果,无人参与时不推送微信群防止刷屏)
|
||||||
try {
|
try {
|
||||||
$wechatService = new \App\Services\WechatBot\WechatNotificationService;
|
if (!empty($winners) || !empty($losers)) {
|
||||||
$wechatService->notifyBaccaratResult($content);
|
$wechatService = new \App\Services\WechatBot\WechatNotificationService;
|
||||||
|
$wechatService->notifyBaccaratResult($content);
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Illuminate\Support\Facades\Log::error('WechatBot baccarat notification failed', ['error' => $e->getMessage()]);
|
\Illuminate\Support\Facades\Log::error('WechatBot baccarat notification failed', ['error' => $e->getMessage()]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user