diff --git a/backend/ddang/src/main/java/com/ddang/ddang/chat/application/MessageService.java b/backend/ddang/src/main/java/com/ddang/ddang/chat/application/MessageService.java index 01acd27e9..d053ffdc6 100644 --- a/backend/ddang/src/main/java/com/ddang/ddang/chat/application/MessageService.java +++ b/backend/ddang/src/main/java/com/ddang/ddang/chat/application/MessageService.java @@ -61,7 +61,12 @@ public Long create(final CreateMessageDto dto, final String baseUrl) { private void sendNotification(final Message message, final String baseUrl) { final Long profileImageId = ImageIdProcessor.process(message.getWriter().getProfileImage()); - final String profileImageUrl = baseUrl.concat(String.valueOf(profileImageId)); + + // TODO: 2023/09/15 5차데모데이 이후 수정 예정 + String profileImageUrl = null; + if (profileImageId != null) { + profileImageUrl = baseUrl.concat(String.valueOf(profileImageId)); + } final CreateNotificationDto dto = new CreateNotificationDto( NotificationType.MESSAGE, diff --git a/backend/ddang/src/main/java/com/ddang/ddang/notification/application/FcmNotificationService.java b/backend/ddang/src/main/java/com/ddang/ddang/notification/application/FcmNotificationService.java index 289879cac..f47c8d33f 100644 --- a/backend/ddang/src/main/java/com/ddang/ddang/notification/application/FcmNotificationService.java +++ b/backend/ddang/src/main/java/com/ddang/ddang/notification/application/FcmNotificationService.java @@ -8,6 +8,7 @@ import com.google.firebase.messaging.FirebaseMessagingException; import com.google.firebase.messaging.Message; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -20,6 +21,7 @@ @Service @Transactional(readOnly = true) @RequiredArgsConstructor +@Slf4j public class FcmNotificationService implements NotificationService { private static final String NOTIFICATION_SEND_SUCCESS = "알림 전송 성공"; @@ -55,6 +57,7 @@ private String makeAndSendMessage( firebaseMessaging.send(message); return NOTIFICATION_SEND_SUCCESS; } catch (FirebaseMessagingException ex) { + log.error("exception type : {}, ", ex.getClass().getSimpleName(), ex); return NOTIFICATION_SEND_FAIL; } }