Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for sending notifications with include_external_user_ids #128

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

aaronflorey
Copy link

I was having an issue when using include_external_user_ids; The OneSignal API was returning an error: Platforms You may only send to one delivery channel at a time. Make sure you are only including one of push platforms, isEmail, or isSms.

This is fixed by setting channel_for_external_user_ids to Push, so the API knows which players to send.

This is a quick fix, but could possibly be made configurable.

I was having an issue when using include_external_user_ids; The OneSignal API was returning an error: `Platforms You may only send to one delivery channel at a time. Make sure you are only including one of push platforms, isEmail, or isSms.`

This is fixed by setting channel_for_external_user_ids to Push, so the API knows which players to send.

This is a quick fix, but could possibly be made configurable.
Copy link

@Jahyrm Jahyrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem can be solved adding this to the create() method:

OneSignalMessage::create()
    ...
    ->setParameter('channel_for_external_user_ids', 'push')
    ...;

Where "push" can be change for: "email" or "sms" when sending to that channel. Remember you can make a call to one channel at a time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants