Skip to content

Commit a9490fa

Browse files
author
Christoph Rumpel
committed
Return twitter api response so it is availabe in the notification events
1 parent c5e78cb commit a9490fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/TwitterChannel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ public function send($notifiable, Notification $notification)
3232
$twitterMessage = $notification->toTwitter($notifiable);
3333
$twitterMessage = $this->addImagesIfGiven($twitterMessage);
3434

35-
$this->twitter->post($twitterMessage->getApiEndpoint(), $twitterMessage->getRequestBody($this->twitter),
35+
$twitterApiResponse = $this->twitter->post($twitterMessage->getApiEndpoint(), $twitterMessage->getRequestBody($this->twitter),
3636
$twitterMessage->isJsonRequest);
3737

3838
if ($this->twitter->getLastHttpCode() !== 200) {
3939
throw CouldNotSendNotification::serviceRespondsNotSuccessful($this->twitter->getLastBody());
4040
}
41+
42+
return $twitterApiResponse;
4143
}
4244

4345
/**

0 commit comments

Comments
 (0)