-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor : 알림 전송 로직을 NotificationService에 위임
- sendNotificationToMembers() : 그룹, 알림 받는 사람, 카테고리, 메세지 파라미터로 받아 알림 전송 - 예외 로깅을 알림 속에서 처리
- Loading branch information
Showing
10 changed files
with
113 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...tification/enums/NotificationMessage.java → ...ification/enums/NotificationCategory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
package com.gamzabat.algohub.feature.notification.enums; | ||
|
||
public enum NotificationMessage { | ||
public enum NotificationCategory { | ||
PROBLEM_STARTED("[%s] 문제가 시작되었습니다! 지금 도전해보세요!"), | ||
NEW_SOLUTION_POSTED("%s님이 새로운 풀이를 등록했습니다! 풀이를 확인하고 의견을 나눠보세요."), | ||
NEW_MEMBER_JOINED("%s님이 %s 스터디에 합류했습니다!"), | ||
NEW_MEMBER_JOINED("%s님이 스터디에 합류했습니다!"), | ||
NEW_COMMENT_POSTED("%s님이 내 풀이에 코멘트를 남겼습니다! 어떤 리뷰인지 확인해보세요."), | ||
PROBLEM_DEADLINE_REACHED("[%s] 문제의 마감이 얼마 남지 않았습니다! 아직 해결하지 못했다면 지금 도전해보세요!"); | ||
PROBLEM_DEADLINE_REACHED("[%s] 문제의 마감이 오늘입니다! 아직 해결하지 못했다면 지금 도전해보세요!"); | ||
|
||
private final String message; | ||
|
||
NotificationMessage(String message) { | ||
NotificationCategory(String message) { | ||
this.message = message; | ||
} | ||
|
||
public String format(Object... args) { | ||
public String getMessage(Object... args) { | ||
return String.format(message, args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.