Skip to content

Commit

Permalink
Update FCM docs
Browse files Browse the repository at this point in the history
Closes #456
  • Loading branch information
excid3 authored Jun 24, 2024
1 parent 41f2f59 commit 14aad24
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions docs/delivery_methods/fcm.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,8 @@ Firebase Cloud Messaging Notifications may fail delivery if the user has removed

```ruby
class CommentNotification
deliver_by :fcm

# Remove invalid device tokens
#
# token - the device token from iOS or FCM
# platform - "iOS" or "fcm"
def cleanup_device_token(token:, platform:)
NotificationToken.where(token: token, platform: platform).destroy_all
deliver_by :fcm do |config|
config.invalid_token = ->(device_token) { device_token.destroy }
end
end
```

0 comments on commit 14aad24

Please sign in to comment.