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

fix: Fcm 메세지 전송 조건문 반대로 적용 #242

Merged
merged 2 commits into from
Jan 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading