-
Notifications
You must be signed in to change notification settings - Fork 0
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
feature: 팔로우/채팅 알림 기능 추가 #71
Conversation
fcm 토큰을 관리하기 위해 redis를 사용
publisher: 이벤트 발생 listener: 발생한 이벤트를 처리
|
||
public String getBody(Long memberId) { | ||
return memberId + this.body; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id보다는 username이 더 나을 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정하겠습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다! 시간이 얼마 없어서 테스트 통과하면 merge하고 요청 사항은 이후에 반영하면 될 것 같습니다.
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum FcmEventDomain { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
클래스 이름을 FcmEvent로 하는건 어떨까요? 도메인이라기 보다는 이벤트 타입인 것 같습니다!
try (InputStream inputStream = new ByteArrayInputStream(configStringValue.getBytes(StandardCharsets.UTF_8))) { | ||
List<FirebaseApp> apps = FirebaseApp.getApps(); | ||
|
||
if (Objects.isNull(apps) || apps.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Objects.isNull()
은 Predicate로 사용하기 위한 메서드입니다! apps == null
로 비교하면 될 것 같아요.
private final FcmTokenService fcmTokenService; | ||
|
||
@PostMapping("/fcm-token") | ||
public CommonResponse saveFcmToken(@LoginUser Member member, @RequestHeader("fcm-token") String fcm) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CommomResponse<Void>
로 고쳐야 할 것 같습니다.
아직 프론트에서 코드 구성이 안됐다면 이 pr은 서버 안 올려도 될 것 같습니다 |
💬 Motivation
❗ Key changes
✏️ To Reviewers