From d3235b0da7df96f56fd5724210720808f1647bb9 Mon Sep 17 00:00:00 2001 From: tjdtn0219 Date: Sun, 28 Jan 2024 18:19:05 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Fcm=20=EB=A9=94=EC=84=B8=EC=A7=80=20?= =?UTF-8?q?=EC=A0=84=EC=86=A1=20=EC=A1=B0=EA=B1=B4=EB=AC=B8=20=EB=B0=98?= =?UTF-8?q?=EB=8C=80=EB=A1=9C=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notification/service/NotificationService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/kr/co/fastcampus/yanabada/domain/notification/service/NotificationService.java b/src/main/java/kr/co/fastcampus/yanabada/domain/notification/service/NotificationService.java index d4c84403..fea164e4 100644 --- a/src/main/java/kr/co/fastcampus/yanabada/domain/notification/service/NotificationService.java +++ b/src/main/java/kr/co/fastcampus/yanabada/domain/notification/service/NotificationService.java @@ -67,7 +67,7 @@ public class NotificationService { @Transactional public void sendChatMessage(Member sender, Member receiver, String content) { - if (!StringUtils.hasText(receiver.getFcmToken())) { + if (StringUtils.hasText(receiver.getFcmToken())) { Notification notification = Notification.builder() .title(CHAT_MESSAGE_TITLE) .body(sender.getNickName() + ": " + content) @@ -79,7 +79,7 @@ public void sendChatMessage(Member sender, Member receiver, String content) { @Transactional public void sendChatCreated(ChatNotificationDto chatDto, String content) { - if (!StringUtils.hasText(chatDto.receiver().getFcmToken())) { + if (StringUtils.hasText(chatDto.receiver().getFcmToken())) { Notification notification = Notification.builder() .title(CHAT_MESSAGE_TITLE) .body(chatDto.sender().getNickName() + ": " + content) @@ -102,7 +102,7 @@ public void sendChatCreated(ChatNotificationDto chatDto, String content) { @Transactional public void sendTradeRequest(TradeNotificationDto tradeNotificationDto) { - if (!StringUtils.hasText(tradeNotificationDto.receiver().getFcmToken())) { + if (StringUtils.hasText(tradeNotificationDto.receiver().getFcmToken())) { Notification notification = Notification.builder() .title(TRADE_REQUEST_TITLE) .body( @@ -131,7 +131,7 @@ public void sendTradeRequest(TradeNotificationDto tradeNotificationDto) { @Transactional public void sendTradeCanceled(TradeNotificationDto tradeNotificationDto) { - if (!StringUtils.hasText(tradeNotificationDto.receiver().getFcmToken())) { + if (StringUtils.hasText(tradeNotificationDto.receiver().getFcmToken())) { Notification notification = Notification.builder() .title(TRADE_CANCELED_TITLE) .body( @@ -161,7 +161,7 @@ public void sendTradeCanceled(TradeNotificationDto tradeNotificationDto) { @Transactional public void sendTradeApproval(TradeNotificationDto tradeNotificationDto) { - if (!StringUtils.hasText(tradeNotificationDto.receiver().getFcmToken())) { + if (StringUtils.hasText(tradeNotificationDto.receiver().getFcmToken())) { Notification notification = Notification.builder() .title(TRADE_APPROVAL_TITLE) .body( @@ -190,7 +190,7 @@ public void sendTradeApproval(TradeNotificationDto tradeNotificationDto) { @Transactional public void sendTradeRejected(TradeNotificationDto tradeNotificationDto) { - if (!StringUtils.hasText(tradeNotificationDto.receiver().getFcmToken())) { + if (StringUtils.hasText(tradeNotificationDto.receiver().getFcmToken())) { Notification notification = Notification.builder() .title(TRADE_REJECTED_TITLE) .body(