Skip to content

Commit dc6dec3

Browse files
authored
Merge pull request #74 from mediabc/patch-1
Update exponent-server-sdk-php version
2 parents a545cf4 + d54d20b commit dc6dec3

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"require": {
1414
"php": "^7.1.3|^8.0",
15-
"alymosul/exponent-server-sdk-php": "1.1.*",
15+
"alymosul/exponent-server-sdk-php": "1.3.*",
1616
"laravel/framework": "^5.6 | ^6.0 | ^7.0 | ^8.0"
1717
},
1818
"require-dev": {

src/ExpoChannel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ public function send($notifiable, Notification $notification)
4848
$interest = $notifiable->routeNotificationFor('ExpoPushNotifications')
4949
?: $this->interestName($notifiable);
5050

51+
$interests = [$interest];
52+
5153
try {
5254
$this->expo->notify(
53-
$interest,
55+
$interests,
5456
$notification->toExpoPush($notifiable)->toArray(),
5557
config('exponent-push-notifications.debug')
5658
);

tests/ChannelTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function itCanSendANotification()
6868

6969
$data = $message->toArray();
7070

71-
$this->expo->shouldReceive('notify')->with('interest_name', $data, true)->andReturn([['status' => 'ok']]);
71+
$this->expo->shouldReceive('notify')->with(['interest_name'], $data, true)->andReturn([['status' => 'ok']]);
7272

7373
$this->channel->send($this->notifiable, $this->notification);
7474
}
@@ -80,7 +80,7 @@ public function itFiresFailureEventOnFailure()
8080

8181
$data = $message->toArray();
8282

83-
$this->expo->shouldReceive('notify')->with('interest_name', $data, true)->andThrow(ExpoException::class, '');
83+
$this->expo->shouldReceive('notify')->with(['interest_name'], $data, true)->andThrow(ExpoException::class, '');
8484

8585
$this->events->shouldReceive('dispatch')->with(Mockery::type(NotificationFailed::class));
8686

0 commit comments

Comments
 (0)