From ce879a2e8f0ec47baf3a43fa032cfe20d2eeeda8 Mon Sep 17 00:00:00 2001 From: hos3ein Date: Fri, 13 Jan 2023 10:05:55 +0330 Subject: [PATCH 1/3] Remove the mandatory parameter which is optional Sender number or $message->from is an optional parameter to Kavenegar api --- src/Channel/KavenegarChannel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Channel/KavenegarChannel.php b/src/Channel/KavenegarChannel.php index 6728deb..8c2dbec 100644 --- a/src/Channel/KavenegarChannel.php +++ b/src/Channel/KavenegarChannel.php @@ -47,7 +47,7 @@ public function send($notifiable, $notification) $message = $notification->toKavenegar($notifiable); $message->to($message->to ?: $notifiable->routeNotificationFor('kavenegar', $notification)); - if (!$message->to || !($message->from || $message->method)) { + if (!$message->to || !$message->method) { return; } From d4fdd41d47718858d675df2acb2e996111805aa5 Mon Sep 17 00:00:00 2001 From: hos3ein Date: Fri, 27 Jan 2023 10:59:31 +0330 Subject: [PATCH 2/3] Update KavenegarChannel.php --- src/Channel/KavenegarChannel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Channel/KavenegarChannel.php b/src/Channel/KavenegarChannel.php index 8c2dbec..3244233 100644 --- a/src/Channel/KavenegarChannel.php +++ b/src/Channel/KavenegarChannel.php @@ -47,7 +47,7 @@ public function send($notifiable, $notification) $message = $notification->toKavenegar($notifiable); $message->to($message->to ?: $notifiable->routeNotificationFor('kavenegar', $notification)); - if (!$message->to || !$message->method) { + if (!$message->to and !$message->method) { return; } From 161098de2032d9872fe50c69a87c0631a147b15e Mon Sep 17 00:00:00 2001 From: hos3ein Date: Fri, 27 Jan 2023 12:14:25 +0330 Subject: [PATCH 3/3] Update KavenegarChannel.php --- src/Channel/KavenegarChannel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Channel/KavenegarChannel.php b/src/Channel/KavenegarChannel.php index 3244233..7a3ab56 100644 --- a/src/Channel/KavenegarChannel.php +++ b/src/Channel/KavenegarChannel.php @@ -47,7 +47,7 @@ public function send($notifiable, $notification) $message = $notification->toKavenegar($notifiable); $message->to($message->to ?: $notifiable->routeNotificationFor('kavenegar', $notification)); - if (!$message->to and !$message->method) { + if (!$message->to) { return; }