From 383736c41af0781d5e19c4d52992727cfb972936 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Wed, 1 Mar 2023 23:13:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20=E9=81=B5=E5=BE=AA?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E9=80=9A=E7=9F=A5=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Notifications/WorkOrder/Reply.php | 4 ++++ app/Notifications/WorkOrder/WorkOrder.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/Notifications/WorkOrder/Reply.php b/app/Notifications/WorkOrder/Reply.php index b2e9553..d81401d 100644 --- a/app/Notifications/WorkOrder/Reply.php +++ b/app/Notifications/WorkOrder/Reply.php @@ -36,6 +36,10 @@ public function __construct(ReplyModel $reply) */ public function via(): array { + if (! $this->work_order->notify) { + return []; + } + $channels = [WeComChannel::class, WebChannel::class]; if ($this->work_order->status === 'replied') { diff --git a/app/Notifications/WorkOrder/WorkOrder.php b/app/Notifications/WorkOrder/WorkOrder.php index 981a882..e4b6b4c 100644 --- a/app/Notifications/WorkOrder/WorkOrder.php +++ b/app/Notifications/WorkOrder/WorkOrder.php @@ -30,6 +30,10 @@ public function __construct(WorkOrderModel $work_order) */ public function via(): array { + if (! $this->work_order->notify) { + return []; + } + return [WeComChannel::class, WebChannel::class]; }