-
Notifications
You must be signed in to change notification settings - Fork 0
Maintenance: Notification Service - Improve logging and reduce data redundancy #110
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
Conversation
…edundancy
Fixed two code quality issues in FcmNotificationSender:
1. Fixed logging format string with trailing comma and space
- Line 65 had incorrect format: "message={}, "
- Changed to proper format: "message={}"
2. Removed redundant data duplication
- Title and body were being added to both Notification object and data map
- Firebase already includes notification title/body in the payload
- Removed redundant putData calls for title and body
- Now only custom data fields are added to the data map
These changes improve code consistency and reduce unnecessary data transmission
in FCM notifications without affecting functionality.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Code Review for PR #110: Notification Service MaintenanceI've reviewed the changes in this PR. Overall, the changes are good improvements that enhance code quality. However, I've identified some important considerations below. ✅ Approved Changes1. Logging Format Fix (Line 63) ✓Change: Removed trailing comma and space from log format string - log.info("Token send failed: token={}, error={}, message={}, ", ...);
+ log.info("Token send failed: token={}, error={}, message={}", ...);Assessment: Excellent catch! This is a clear bug fix.
2. Removed Data Field Duplication (Lines 36-37)
|
Summary
Performed routine maintenance inspection on the notification subsystem and identified two code quality issues in
FcmNotificationSender:Area Inspected
Notification Service (
src/main/java/spring/memewikibe/.../notification/)Issues Found
1. Logging Format Issue (FcmNotificationSender:65)
Problem: Log statement had incorrect format string with trailing comma and space
Fix: Removed trailing comma and space
2. Redundant Data Duplication (FcmNotificationSender:36-37)
Problem: Title and body were being added to both the Notification object AND as data fields
Fix: Removed redundant putData calls since Firebase already includes notification title/body in the payload
Why These Changes Improve the Code
meme_id,deep_link) are added to the data mapTest Results
All notification-related tests pass:
Observations
The notification service overall is well-designed:
🤖 Generated with Claude Code