From 14aad249b2da46a59911a0d664d414b4865b5aee Mon Sep 17 00:00:00 2001 From: Chris Oliver Date: Mon, 24 Jun 2024 08:54:26 -0500 Subject: [PATCH] Update FCM docs Closes #456 --- docs/delivery_methods/fcm.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/delivery_methods/fcm.md b/docs/delivery_methods/fcm.md index c672334..e2bb6fa 100644 --- a/docs/delivery_methods/fcm.md +++ b/docs/delivery_methods/fcm.md @@ -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 ```