Skip to content

Commit 1d88534

Browse files
Merge pull request #42 from klaasgeldof/new_branch
Pass notification instance to routeNotificationFor call
2 parents 7634ff6 + a0f1be3 commit 1d88534

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/MessagebirdChannel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ public function __construct(MessagebirdClient $client, Dispatcher $dispatcher =
2222
/**
2323
* Send the given notification.
2424
*
25-
* @param mixed $notifiable
26-
* @param \Illuminate\Notifications\Notification $notification
27-
*
25+
* @param mixed $notifiable
26+
* @param \Illuminate\Notifications\Notification $notification
2827
* @return object with response body data if succesful response from API | empty array if not
28+
*
2929
* @throws \NotificationChannels\MessageBird\Exceptions\CouldNotSendNotification
3030
*/
3131
public function send($notifiable, Notification $notification)
@@ -38,7 +38,7 @@ public function send($notifiable, Notification $notification)
3838
$message = MessagebirdMessage::create($message);
3939
}
4040

41-
if ($to = $notifiable->routeNotificationFor('messagebird')) {
41+
if ($to = $notifiable->routeNotificationFor('messagebird', $notification)) {
4242
$message->setRecipients($to);
4343
}
4444

src/MessagebirdMessage.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class MessagebirdMessage
88
public $originator;
99
public $recipients;
1010
public $reference;
11+
public $datacoding;
1112
public $reportUrl;
1213

1314
public static function create($body = '')

0 commit comments

Comments
 (0)