Skip to content

Commit

Permalink
remove unnecessary raise as json is required for fcm
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-6 committed Jan 23, 2024
1 parent 7c4a732 commit 8988b2c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/noticed/delivery_methods/fcm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ def send_notification(device_token)
end

def format_notification(device_token)
raise ArgumentError, "No json for fcm delivery. Add the 'json' option in 'deliver_by :fcm'." unless (method = config[:json])

method = config[:json]
if method.is_a?(Symbol) && event.respond_to?(method)
event.send(method, device_token)
else
Expand Down

0 comments on commit 8988b2c

Please sign in to comment.