Skip to content

Commit b487fa9

Browse files
authored
Merge pull request #21 from YieldStudio/feature/manage-json-response-details
Manage instable responseItem details format from API
2 parents fd8eac7 + 4e96c3f commit b487fa9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ExpoNotificationsService.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ public function receipts(Collection|array $tokenIds): Collection
119119
->status($responseItem['status']);
120120

121121
if ($responseItem['status'] === ExpoResponseStatus::ERROR->value) {
122+
$responseItemDetails = is_string($responseItem['details']) ? json_decode($responseItem['details']) : $responseItem['details'];
123+
122124
$data
123125
->message($responseItem['message'])
124-
->details($responseItem['details']);
126+
->details($responseItemDetails);
125127
}
126128

127129
return $data;

0 commit comments

Comments
 (0)