Skip to content

Commit

Permalink
feat: 키워드 알림 schemeUri변경 (#1084)
Browse files Browse the repository at this point in the history
* feat: 키워드 알림 schemeUri에 keyword 추가

* refactor: 구조 변경
  • Loading branch information
seongjae6751 authored Nov 25, 2024
1 parent 0a47f33 commit 15562b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private Notification createAndRecordNotification(
Notification notification = notificationFactory.generateKeywordNotification(
KEYWORD,
event.articleId(),
keyword,
articleTitle,
description,
subscribe.getUser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ public Notification generateDiningImageUploadNotification(
public Notification generateKeywordNotification(
MobileAppPath path,
Integer eventKeywordId,
String keyword,
String title,
String description,
User target
) {
return new Notification(
path,
generateSchemeUri(path, eventKeywordId),
generateKeywordSchemeUri(path, eventKeywordId, keyword),
title,
description,
null,
Expand All @@ -110,4 +111,11 @@ private String getPostposition(String place, String firstPost, String secondPost
String result = (lastChar - 0xAC00) % 28 > 0 ? firstPost : secondPost;
return place + result;
}

private String generateKeywordSchemeUri(MobileAppPath path, Integer eventId, String keyword) {
if (keyword == null) {
return generateSchemeUri(path, eventId);
}
return String.format("%s?id=%d&keyword=%s", path.getPath(), eventId, keyword);
}
}

0 comments on commit 15562b9

Please sign in to comment.