fix(wechat): 移除发送队列中已废弃的全局总开关判断导致消息被丢弃的问题
This commit is contained in:
@@ -56,15 +56,8 @@ class SendWechatBotMessage implements ShouldQueue
|
||||
return;
|
||||
}
|
||||
|
||||
$params = SysParam::where('alias', 'wechat_bot_config')->first();
|
||||
if ($params && ! empty($params->body)) {
|
||||
$config = json_decode($params->body, true);
|
||||
$isEnabled = $config['global_enabled'] ?? false;
|
||||
|
||||
if (! $isEnabled) {
|
||||
return; // 全局未开启,直接抛弃不发
|
||||
}
|
||||
}
|
||||
// 所有的触发开关判断(如百家乐、管理员上线等)已经提前在 WechatNotificationService 中拦截判断过了。
|
||||
// 所以能进入到这个任务的消息,都是明确需要发送的。
|
||||
|
||||
try {
|
||||
$apiService->sendTextMessage($this->target, $this->message);
|
||||
|
||||
Reference in New Issue
Block a user