Skip to content

Commit 9c850a2

Browse files
Merge pull request #77 from hazaveh/master
use per user settings only if notifiable is a type of notifiable
2 parents 15b93cc + 21527ff commit 9c850a2

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)