norkunas / onesignal-php-api

OneSignal API for PHP
MIT License
234 stars 83 forks source link

Add value "send_after" to allowed options for "delayed_option" property #156

Closed alex-bukach closed 2 years ago

alex-bukach commented 2 years ago

When trying to send a push notification with delayed_option property set to "send_after" and send_after property set to a specific date I get the following error:

Symfony\Component\OptionsResolver\Exception\InvalidOptionsException: The option "delayed_option" with value "send_after" is invalid. Accepted values are: "timezone", "last-active". in Symfony\Component\OptionsResolver\OptionsResolver->offsetGet() (line 1106 of ./vendor/symfony/options-resolver/OptionsResolver.php).

According to https://documentation.onesignal.com/reference/create-notification send_after is a valid option of delayed_option property.

norkunas commented 2 years ago

But if you are using send_after then it's already delayed, no? :) If you consider this as a bug, then please consider contributing by making a PR with a fix :bow:

alex-bukach commented 2 years ago

@norkunas indeed, it works without setting delayed_option value. It was not obvious from the docs. Thanks for the hint!