Skip to content

[REFACTOR] NOTI-03 푸쉬 메시지 변경#136

Merged
Chhun-Lee merged 1 commit intodevfrom
feat/#75_OAuth2_login
Feb 11, 2026
Merged

[REFACTOR] NOTI-03 푸쉬 메시지 변경#136
Chhun-Lee merged 1 commit intodevfrom
feat/#75_OAuth2_login

Conversation

@Chhun-Lee
Copy link
Collaborator

@Chhun-Lee Chhun-Lee commented Feb 11, 2026

🎋 이슈 및 작업중인 브랜치

🔑 주요 내용

  • NOTI-03 푸쉬 메시지 변경

Check List

  • Reviewers 등록을 하였나요?
  • Assignees 등록을 하였나요?
  • 라벨(Label) 등록을 하였나요?
  • PR 머지하기 전 반드시 CI가 정상적으로 작동하는지 확인해주세요!

Summary by CodeRabbit

릴리스 노트

  • Refactor
    • 알림 시스템의 메서드 시그니처를 최적화하여 불필요한 파라미터를 제거했습니다.
    • 알림 메시지 포맷을 간소화하여 푸시 알림 전송 프로세스를 개선했습니다.

@Chhun-Lee Chhun-Lee self-assigned this Feb 11, 2026
@Chhun-Lee Chhun-Lee added the ♻️ REFACTOR 리팩토링 관련 라벨 label Feb 11, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

알림 시스템에서 nickname 매개변수를 제거하여 FcmService와 FcmAsyncService의 sendNotification 메서드 서명을 단순화했습니다. 모든 호출 사이트와 관련 메서드에서 nickname 인자가 제거되었습니다.

Changes

Cohort / File(s) Summary
Notification Service Signatures
src/main/java/com/umc/nuvibe/domain/notification/service/FcmService.java, src/main/java/com/umc/nuvibe/domain/notification/service/FcmAsyncService.java
sendNotification 메서드 서명에서 nickname 매개변수 제거. FcmAsyncService 호출 시 nickname 인자 전달 제거.
Notification Type Message Formatting
src/main/java/com/umc/nuvibe/domain/notification/vo/NotificationType.java
formatPushMessage 메서드 서명을 단일 파라미터(String tag)로 변경. NOTI_03 메시지 템플릿에서 {{nickname}} 플레이스홀더 제거 및 메시지 텍스트 업데이트.
Notification Scheduler Updates
src/main/java/com/umc/nuvibe/domain/notification/scheduler/NotificationScheduler.java
NOTI_06, NOTI_07, NOTI_08, NOTI_09 실행 경로에서 sendNotification 호출 시 trailing null 인자 제거.
Service Implementation Updates
src/main/java/com/umc/nuvibe/domain/tribe/service/emoji/EmojiServiceImpl.java, src/main/java/com/umc/nuvibe/domain/user/service/UserServiceImpl.java
모든 sendNotification 호출에서 nickname 인자 제거. 불필요한 null 파라미터 제거.

Possibly related PRs

Suggested reviewers

  • jaemin0413
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경사항의 주요 부분을 반영하지만, 실제 변경은 nickname 파라미터 제거 리팩토링이며 NOTI-03 메시지 수정만이 부분적으로 관련됨.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#75_OAuth2_login

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/main/java/com/umc/nuvibe/domain/notification/vo/NotificationType.java (1)

28-47: 🧹 Nitpick | 🔵 Trivial

태그 포맷팅 로직 중복 — 헬퍼 메서드 추출을 고려해 보세요.

formatPushMessage, formatMainMessage, formatActionMessage 세 메서드 모두 동일한 태그 포맷팅 및 치환 로직을 반복하고 있습니다. private 헬퍼 메서드로 추출하면 유지보수성이 향상됩니다.

♻️ 헬퍼 메서드 추출 제안
+    private String replaceTag(String template, String tag) {
+        String formattedTag = (tag != null && !tag.isBlank()) ? "#" + tag + " " : "";
+        return template
+                .replace("{{tag}} ", formattedTag)
+                .replace("{{tag}}", formattedTag.trim());
+    }
+
     public String formatPushMessage(String tag) {
-        String formattedTag = (tag != null && !tag.isBlank()) ? "#" + tag + " " : "";
-        return pushMessage
-                .replace("{{tag}} ", formattedTag)
-                .replace("{{tag}}", formattedTag.trim());
+        return replaceTag(pushMessage, tag);
     }
 
     public String formatMainMessage(String tag) {
-        String formattedTag = (tag != null && !tag.isBlank()) ? "#" + tag + " " : "";
-        return mainMessage
-                .replace("{{tag}} ", formattedTag)
-                .replace("{{tag}}", formattedTag.trim());
+        return replaceTag(mainMessage, tag);
     }
 
     public String formatActionMessage(String tag) {
-        String formattedTag = (tag != null && !tag.isBlank()) ? "#" + tag + " " : "";
-        return actionMessage
-                .replace("{{tag}} ", formattedTag)
-                .replace("{{tag}}", formattedTag.trim());
+        return replaceTag(actionMessage, tag);
     }
src/main/java/com/umc/nuvibe/domain/notification/scheduler/NotificationScheduler.java (1)

182-184: ⚠️ Potential issue | 🟡 Minor

주석의 시간 표기 오류: "오전 18시" → "오후 6시" 또는 "18시"

Line 182의 주석에 오전 18시라고 되어 있으나, 크론 표현식 0 0 18 1 * *은 18:00(오후 6시)입니다. 오전은 AM을 의미하므로 모순됩니다.

📝 주석 수정 제안
-    // NOTI-09: 전체 리캡 알림
-    // 매월 1일 오전 18시에 실행
+    // NOTI-09: 전체 리캡 알림
+    // 매월 1일 18시에 실행

@Chhun-Lee Chhun-Lee merged commit d54f15e into dev Feb 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ REFACTOR 리팩토링 관련 라벨

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant