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] FCM claims to support Symbol for credentials #475

Closed
3 tasks done
bvogel opened this issue Jul 29, 2024 · 2 comments
Closed
3 tasks done

[BUG] FCM claims to support Symbol for credentials #475

bvogel opened this issue Jul 29, 2024 · 2 comments

Comments

@bvogel
Copy link

bvogel commented Jul 29, 2024

Bug Report

Describe the Bug:
FCM does not support configurations through symbols any more.

To Reproduce:

    deliver_by :fcm do |config|
      config.credentials = :firebase_credentials
      config.device_tokens = :fcm_device_tokens
      config.json = :firebase_notification
    end

should work, but results in ArgumentError: FCM credentials must be a Hash, String, Pathname, or Symbol as 47b032d8f2a7d7e677d4bea removed symbol support.

Expected Behavior:
Symbols should work or error and documentation should reflect the cuent state.

Actual Behavior:
ArgumentError: FCM credentials must be a Hash, String, Pathname, or Symbol

Environment:

  • Noticed gem version: 2.2.2
  • Ruby version: 3.3.4
  • Rails version: 7.1.3.4
  • Operating System: docker

Possible Fix:
add this back in:

          when Symbol
            notification.send(option)

Checklist:

  • I have searched for similar issues and couldn't find any
  • I have checked the documentation for relevant information
  • I have included all the required information
@excid3
Copy link
Owner

excid3 commented Jul 29, 2024

evaluate_option is what handles the Symbol, so it works as expected.

The return value of your function needs to return a hash of credentials, or a path to the credentials file.

@excid3 excid3 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2024
@bvogel
Copy link
Author

bvogel commented Jul 30, 2024

ok, for anyone else running into this: make sure the method defined by the symbol is public

excid3 added a commit that referenced this issue Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants