|
@@ -19,7 +19,7 @@ discard block |
|
|
block discarded – undo |
|
19
|
19
|
* |
|
20
|
20
|
* @throws CouldNotSendNotification |
|
21
|
21
|
*/ |
|
22
|
|
- public function send($notifiable, Notification $notification): array|object |
|
|
22
|
+ public function send($notifiable, Notification $notification): array | object |
|
23
|
23
|
{ |
|
24
|
24
|
$this->changeTwitterSettingsIfNeeded($notifiable); |
|
25
|
25
|
|
|
@@ -68,7 +68,7 @@ discard block |
|
|
block discarded – undo |
|
68
|
68
|
if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getImages()) { |
|
69
|
69
|
$this->twitter->setTimeouts(10, 15); |
|
70
|
70
|
|
|
71
|
|
- $twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function (TwitterImage $image) { |
|
|
71
|
+ $twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function(TwitterImage $image) { |
|
72
|
72
|
$media = $this->twitter->upload('media/upload', ['media' => $image->getPath()]); |
|
73
|
73
|
|
|
74
|
74
|
return $media->media_id_string; |
|
@@ -86,7 +86,7 @@ discard block |
|
|
block discarded – undo |
|
86
|
86
|
if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getVideos()) { |
|
87
|
87
|
$this->twitter->setTimeouts(10, 15); |
|
88
|
88
|
|
|
89
|
|
- $twitterMessage->videoIds = collect($twitterMessage->getVideos())->map(function (TwitterVideo $video) { |
|
|
89
|
+ $twitterMessage->videoIds = collect($twitterMessage->getVideos())->map(function(TwitterVideo $video) { |
|
90
|
90
|
$media = $this->twitter->upload('media/upload', [ |
|
91
|
91
|
'media' => $video->getPath(), |
|
92
|
92
|
'media_category' => 'tweet_video', |