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

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

Open
1 task done
PedroPauloML opened this issue Jul 10, 2023 · 1 comment
Open
1 task done
Labels

Comments

@PedroPauloML
Copy link

PedroPauloML commented Jul 10, 2023

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
@tchainaf
Copy link

tchainaf commented Dec 15, 2023

Having the same issue here, I noticed that a lot of things documented here are not accurate.
Have you found a workaround @PedroPauloML?

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

No branches or pull requests

2 participants