Skip to content

Commit dcca941

Browse files
committed
Fix when the same Notification instance is reused multiple times
1 parent 3fe6645 commit dcca941

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Notifications/MessageChannel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ public function send($notifiable, Notification $notification)
1818
return;
1919
}
2020

21-
$this->channelName = str_replace('nexmo-', '', $this->channelName);
21+
$this->nexmoChannelName = str_replace('nexmo-', '', $this->channelName);
2222

2323
$message = $notification->{$this->notificationMappingMethod}($notifiable);
2424

2525
$response = $this->sendMessage(
2626
$message->toNexmoApi(
27-
$this->from($message->getFrom($this->channelName)),
27+
$this->from($message->getFrom($this->nexmoChannelName)),
2828
$this->to($to)
2929
)
3030
);
3131
}
3232

3333
protected function toEndpoint($id, $field) {
34-
return ['type' => $this->channelName, $field => $id];
34+
return ['type' => $this->nexmoChannelName, $field => $id];
3535
}
3636

3737
protected function to($id) {

0 commit comments

Comments
 (0)