Skip to content

Refactor FcmService to support batch sending of FCM messages and impr…#32

Merged
subsub97 merged 1 commit intomainfrom
refactor-fcm-message
Feb 24, 2026
Merged

Refactor FcmService to support batch sending of FCM messages and impr…#32
subsub97 merged 1 commit intomainfrom
refactor-fcm-message

Conversation

@subsub97
Copy link
Collaborator

This pull request refactors the notification dispatch and FCM sending logic to improve batch processing, error handling, and code clarity. The main changes include switching from single-message sending to batch sending in FcmService, updating notification dispatch to leverage batch sending, and simplifying the notification message builder.

Notification dispatch and FCM sending improvements:

  • Refactored FcmService to add sendEach, enabling batch sending of FCM messages with improved error handling and token cleanup for invalid tokens. The previous single-message send method was removed, and batch size is capped at 500.
  • Updated NotificationDispatchService to use batch sending via FcmService.sendEach, group tokens by member, and track notification status more accurately. Removed dependency on FcmTokenService in favor of direct repository access.

Notification message builder simplification:

  • Removed unused ProfileRepository and logger from NotificationMessageBuilder, and added a toData method to NotificationMessage for easy conversion to FCM data format. [1] [2] [3]

Policy fallback logic improvement:

  • Enhanced work policy lookup in WorkdayService to provide a fallback to the latest available policy if none is found for the requested date.…ove error handling

@github-actions
Copy link

Test Results

32 tests   32 ✅  0s ⏱️
 3 suites   0 💤
 3 files     0 ❌

Results for commit 0c23e10.

@subsub97 subsub97 merged commit 540570d into main Feb 24, 2026
2 checks passed
@subsub97 subsub97 deleted the refactor-fcm-message branch February 24, 2026 15:23
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

Successfully merging this pull request may close these issues.

1 participant