Skip to content

Commit

Permalink
feat: manage instable responseItem details format from API
Browse files Browse the repository at this point in the history
  • Loading branch information
dtangdev committed Nov 15, 2023
1 parent fd8eac7 commit 4e96c3f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ExpoNotificationsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,11 @@ public function receipts(Collection|array $tokenIds): Collection
->status($responseItem['status']);

if ($responseItem['status'] === ExpoResponseStatus::ERROR->value) {
$responseItemDetails = is_string($responseItem['details']) ? json_decode($responseItem['details']) : $responseItem['details'];

$data
->message($responseItem['message'])
->details($responseItem['details']);
->details($responseItemDetails);
}

return $data;
Expand Down

0 comments on commit 4e96c3f

Please sign in to comment.