Skip to content

Commit

Permalink
Merge pull request #242 from Yanabada/develop
Browse files Browse the repository at this point in the history
fix: Fcm 메세지 전송 조건문 반대로 적용
  • Loading branch information
tjdtn0219 authored Jan 28, 2024
2 parents f084d23 + c02d340 commit 2147991
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 2147991

Please sign in to comment.