Skip to content

Commit

Permalink
[BE] FCMNotificationEventListener의 FCMChannel을 수정 (#565) (#566)
Browse files Browse the repository at this point in the history
* feat: FCMChannel 세부 추가

- EntryProcess
- EntryAlert

* chore: DTO 형식 수정
  • Loading branch information
seokjin8678 authored Oct 17, 2023
1 parent e86c745 commit 8d01458
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.festago.entry.dto.event;

public record EntryProcessEvent(
Long memberId) {
Long memberId
) {

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public FCMNotificationEventListener(FirebaseMessaging firebaseMessaging, MemberF
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
@Async
public void sendFcmNotification(EntryProcessEvent event) {
List<Message> messages = createMessages(getMemberFCMToken(event.memberId()), FCMChannel.NOT_DEFINED.name());
List<Message> messages = createMessages(getMemberFCMToken(event.memberId()), FCMChannel.ENTRY_PROCESS.name());
try {
BatchResponse batchResponse = firebaseMessaging.sendAll(messages);
checkAllSuccess(batchResponse, event.memberId());
Expand Down
3 changes: 2 additions & 1 deletion backend/src/main/java/com/festago/fcm/domain/FCMChannel.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.festago.fcm.domain;

public enum FCMChannel {
NOT_DEFINED;
ENTRY_PROCESS,
ENTRY_ALERT
}

0 comments on commit 8d01458

Please sign in to comment.