YieldStudio / laravel-expo-notifier

Easily manage Expo notifications with Laravel. Support batched notifications.
MIT License
29 stars 11 forks source link

bugfix: adds tests and fix bug sending more than 100 not batched notifications #25

Closed joemugen closed 6 months ago

joemugen commented 6 months ago

If you were sending more than 100 notifications (not batchable), it would failed because of the Expo Push limitation. This fix will chunk by 100 the notifications. For example, if there is 120 notifications, 2 chunks will be created and 2 requests will be sent to Expo API.

There was no test suite set up, so I had to set this first then I just wrote the test to cover the bugfix. This package is missing tests, feel free to add more :)