Skip to content

Commit 1f83c3d

Browse files
authored
Merge pull request #124 from Team-Shaka/feat/120
🐛 푸시알림 senderName 출력되지 않는 문제 해결
2 parents 13efd46 + 61ab8af commit 1f83c3d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/treehouse/server/api/notification/business/NotificationService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,12 @@ public void createNotification(User user, Long treehouseId, NotificationRequestD
4949
User receiver = userQueryAdapter.findByIdOptional(request.getReceiverId()).orElse(null);
5050
Notification notification = NotificationMapper.toNotification(sender, receiver, request, reactionName);
5151

52+
StringBuilder sb = new StringBuilder();
53+
sb.append(sender.getName()).append(notification.getBody());
54+
String fcmMsgBody = sb.toString();
55+
5256
if(receiver.isPushAgree()) {
53-
fcmService.sendFcmMessage(receiver, notification.getTitle(), notification.getBody());
57+
fcmService.sendFcmMessage(receiver, notification.getTitle(), fcmMsgBody);
5458

5559
}
5660
notificationCommandAdapter.createNotification(notification);

0 commit comments

Comments
 (0)