[OneSignal Plugin] PostNotificationJSAction is should use userIds instead of player ids

Forge Component
Published on 7 May by OutSystems R&D
13 votes
Published on 7 May by OutSystems R&D


PostNotification action should accept UserIds as parameter ("Specific users ids to send your notification to.") but it treats it as player ids sending them directly as part of notificationObj (include_player_ids).

var notificationObj = { contents: {en: $parameters.messageBody},
                          include_player_ids: [$parameters.userId]};

window.plugins.OneSignal.postNotification(notificationObj, Success, Fail);

We've modified the code to access player id stored on Devices entity (had to make it public).

it that an issue that will be fixed or we are missing something?

Thank you.