onesignal-node-api icon indicating copy to clipboard operation
onesignal-node-api copied to clipboard

Fixed create push notification with external_id

Open GizemSever opened this issue 1 year ago • 3 comments

Description

  • Fixed create push notification with external_id, onesignal_id

Details

  • createNotification function is not send include_aliases object with extearnal_id values

Motivation

  • Fixes a specific bug,

Testing

Manual testing

  • Creating push notifications using external_id value was tested.

Checklist

Overview

  • [X] I have filled out all REQUIRED sections above
  • [X] PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • [X] Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • [X] I have personally tested this on my device, or explained why that is not possible

Final pass

  • [x] Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • [X] I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

GizemSever avatar Jan 03 '24 16:01 GizemSever

Any updates?

ayokay123 avatar Jan 24 '24 09:01 ayokay123

What is the update on this? This literally does not work. What a joke.

ansh avatar Jan 31 '24 03:01 ansh

Hi @GizemSever, thank you for submitting this PR and include_aliases is indeed not working as expected.

We are working on overhauling the APIs and interfaces to be updated and correct, and the fix for include_aliases will be included.

In the meantime, it is still safe to use include_external_user_ids to send notifications to target by External ID, and include_player_ids to target by Subscription ID, instead of using include_aliases.

This library is actually generated from a primary spec via the OpenAPI generator so no code in this library is updated manually. In addition, include_aliases needs to be more generic since developers can have any string as an alias label, not just "onesignal_id" or "external_id".

nan-li avatar Jan 31 '24 04:01 nan-li