Skip to content

Commit

Permalink
[FEATURE] 알림 테스트 기능 추가, 알림에 url 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
wnehgus101 committed Aug 21, 2024
1 parent 077917e commit 38b34f8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class FCMService {

private final CategoryService categoryService;

public void sendFCMMessage(Alarm alarm, String keyword) {
public void sendFCMMessage(Alarm alarm, String keyword, String url) {
try{
String category = categoryService.getCategoryNameInKorean(alarm.getNoticeType());
String cutTitle = cutTitle(alarm.getTitle(), 30);
Expand All @@ -25,7 +25,8 @@ public void sendFCMMessage(Alarm alarm, String keyword) {
Message message = Message.builder()
.putData("title", "띵커벨")
.putData("body", messageBody)
.putData("notification_id", UUID.randomUUID().toString()) // 고유한 ID
.putData("notification_id", UUID.randomUUID().toString())// 고유한 ID
.putData("url", url)
.setToken(alarm.getUser().getFcmToken())
.build();

Expand Down

0 comments on commit 38b34f8

Please sign in to comment.