Skip to content
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

Closed
wants to merge 29 commits into from

Conversation

jaeesu
Copy link
Contributor

@jaeesu jaeesu commented May 21, 2022

💬 Motivation

  • 팔로우, 채팅방 생성과 알림 기능이 비동기로 동작하도록 하기 위해 알림 푸싱 이벤트를 생성하도록 했습니다.

❗ Key changes

  • 이벤트 관련 패키지 추가
  • fcm, 알림 관련 패키지 추가
  • 팔로우, 채팅방 생성 시 이벤트 발생 로직 추가

✏️ To Reviewers

  • 파일 구조나 로직에 대해서 많은 피드백 부탁드립니다~
  • 아직 프론트쪽 구현을 안 해서 제대로 작동되는지는 모르겠습니다. 프론트 구현에 시간이 걸릴 것 같아 우선 올렸습니다.

@jaeesu jaeesu requested review from seongho-joo and ch0213 May 21, 2022 03:08
@jaeesu jaeesu linked an issue May 21, 2022 that may be closed by this pull request
5 tasks
@github-actions
Copy link

github-actions bot commented May 21, 2022

Unit Test Results

30 files  30 suites   19m 21s ⏱️
58 tests 13 ✔️ 0 💤 45

For more details on these failures, see this check.

Results for commit 8a99bb0.

♻️ This comment has been updated with latest results.


public String getBody(Long memberId) {
return memberId + this.body;
}
Copy link
Member

Choose a reason for hiding this comment

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

id보다는 username이 더 나을 것 같습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

수정하겠습니다!

Copy link
Contributor

@ch0213 ch0213 left a 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 {
Copy link
Contributor

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()) {
Copy link
Contributor

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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

CommomResponse<Void>로 고쳐야 할 것 같습니다.

@jaeesu
Copy link
Contributor Author

jaeesu commented May 22, 2022

아직 프론트에서 코드 구성이 안됐다면 이 pr은 서버 안 올려도 될 것 같습니다

@jaeesu jaeesu closed this Jun 2, 2022
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.

[FEATURE] 팔로우/채팅 알림 기능 추가
3 participants