Uh oh!
There was an error while loading. Please reload this page.
Feat: Add OneSignal push provider adapter (#7726) - #131
Conversation
Greptile SummaryThis PR adds a new
Confidence Score: 2/5
Important Files Changed
Reviews (6): Last reviewed commit: "fix: add parent constructor, fix deliver..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| if (!\is_null($message->getSound())) { | ||
| $payload['android_sound'] = $message->getSound(); | ||
| $payload['ios_sound'] = $message->getSound() . '.wav'; | ||
| } |
There was a problem hiding this comment.
Other push adapters pass the message sound through unchanged, and callers may pass values like default or an already-qualified filename. Appending .wav here changes default to default.wav and chime.wav to chime.wav.wav, which can make iOS use the wrong sound or no custom sound at all.
| if (!\is_null($message->getSound())) { | |
| $payload['android_sound'] = $message->getSound(); | |
| $payload['ios_sound'] = $message->getSound() . '.wav'; | |
| } | |
| if (!\is_null($message->getSound())) { | |
| $payload['android_sound'] = $message->getSound(); | |
| $payload['ios_sound'] = $message->getSound(); | |
| } |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| if (!\is_null($message->getContentAvailable())) { | ||
| $payload['content_available'] = true; | ||
| } |
There was a problem hiding this comment.
content_available condition inverts intent when explicitly set to false
The guard !\is_null($message->getContentAvailable()) is true for both true and false. If a caller explicitly constructs Push with contentAvailable: false, the adapter still writes 'content_available' => true into the payload, silently enabling silent/background push on OneSignal devices when the caller's intent was the opposite. The fix is to check the boolean value directly: if ($message->getContentAvailable()).
deepshekhardas
commented
Jul 11, 2026
Following up - OneSignal push adapter. Ready for review. |
…h fields (icon, color, tag, contentAvailable, priority) (cherry picked from commit dc4e0f3)
No description provided.