OneSignal / onesignal-ruby-api

Other
15 stars 12 forks source link

[question]: when creating a Notification should `isIos` default to `true`? #19

Open scottbartell opened 2 years ago

scottbartell commented 2 years ago

How can we help?

Is it intentional for isIos to default to true when creating a Notification?

For example, this request (that doesn't specify is_ios) results in an API request with a body where isIos is set to true:

notification = OneSignal::Notification.new({
  app_id: 'YOUR APP ID',
  include_external_user_ids: [user.id],
  channel_for_external_user_ids: 'push',
  contents: {
    en: body
  },
})
one_signal_client.create_notification(notification)

It looks like it's because of this default: https://github.com/OneSignal/onesignal-ruby-api/blob/master/lib/onesignal/models/notification.rb#L793

Code of Conduct

kesheshyan commented 2 years ago

Hey @scottbartell, thanks for the question. We are about to release an update that should mitigate this issue. I will update this thread when it's done. Thanks!