Skip to content

[Bug]: custom_data is not a valid attribute in OneSignal::Notification #30

@PedroPauloML

Description

@PedroPauloML

What happened?

Reading documentation about message personalization, I found a option to send a param called custom_param. But, when I try to send param custom_data, the gem return a error:

`custom_data` is not a valid attribute in `OneSignal::Notification`

Steps to reproduce?

Just create a notification with param `custom_data`.


notification = OneSignal::Notification.new({
  app_id: ENV["ONE_SIGNAL_APP_ID"],
  template_id: template_id || nil,
  include_external_user_ids: user_ids,
  custom_data: custom_data || {},
})

api_instance.create_notification(notification)

What did you expect to happen?

I expect the notification been created successfully.

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions