Skip to content

Commit 21527ff

Browse files
committed
use per user settings only if notifiable is a notifiable
1 parent bcab129 commit 21527ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TwitterChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function send($notifiable, Notification $notification)
4949
*/
5050
private function changeTwitterSettingsIfNeeded($notifiable)
5151
{
52-
if ($twitterSettings = $notifiable->routeNotificationFor('twitter')) {
52+
if (method_exists($notifiable, 'routeNotificationFor') && $twitterSettings = $notifiable->routeNotificationFor('twitter')) {
5353
$this->twitter = new TwitterOAuth($twitterSettings[0], $twitterSettings[1], $twitterSettings[2],
5454
$twitterSettings[3]);
5555
}

0 commit comments

Comments
 (0)