|
@@ -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->twitter->setApiVersion('1.1'); |
|
25
|
25
|
$this->changeTwitterSettingsIfNeeded($notifiable); |
|
@@ -77,7 +77,7 @@ discard block |
|
|
block discarded – undo |
|
77
|
77
|
if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getImages()) { |
|
78
|
78
|
$this->twitter->setTimeouts(10, 15); |
|
79
|
79
|
|
|
80
|
|
- $twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function (TwitterImage $image) { |
|
|
80
|
+ $twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function(TwitterImage $image) { |
|
81
|
81
|
$media = $this->twitter->upload('media/upload', ['media' => $image->getPath()]); |
|
82
|
82
|
|
|
83
|
83
|
return $media->media_id_string; |
|
@@ -95,7 +95,7 @@ discard block |
|
|
block discarded – undo |
|
95
|
95
|
if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getVideos()) { |
|
96
|
96
|
$this->twitter->setTimeouts(10, 15); |
|
97
|
97
|
|
|
98
|
|
- $twitterMessage->videoIds = collect($twitterMessage->getVideos())->map(function (TwitterVideo $video) { |
|
|
98
|
+ $twitterMessage->videoIds = collect($twitterMessage->getVideos())->map(function(TwitterVideo $video) { |
|
99
|
99
|
$media = $this->twitter->upload('media/upload', [ |
|
100
|
100
|
'media' => $video->getPath(), |
|
101
|
101
|
'media_category' => 'tweet_video', |