diff --git a/src/main/java/in/koreatech/koin/domain/community/keyword/model/ArticleKeywordEventListener.java b/src/main/java/in/koreatech/koin/domain/community/keyword/model/ArticleKeywordEventListener.java index 9196b1d7a..45fff04f4 100644 --- a/src/main/java/in/koreatech/koin/domain/community/keyword/model/ArticleKeywordEventListener.java +++ b/src/main/java/in/koreatech/koin/domain/community/keyword/model/ArticleKeywordEventListener.java @@ -80,6 +80,7 @@ private Notification createAndRecordNotification( Notification notification = notificationFactory.generateKeywordNotification( KEYWORD, event.articleId(), + keyword, articleTitle, description, subscribe.getUser() diff --git a/src/main/java/in/koreatech/koin/global/domain/notification/model/NotificationFactory.java b/src/main/java/in/koreatech/koin/global/domain/notification/model/NotificationFactory.java index 990f17c93..636d95c82 100644 --- a/src/main/java/in/koreatech/koin/global/domain/notification/model/NotificationFactory.java +++ b/src/main/java/in/koreatech/koin/global/domain/notification/model/NotificationFactory.java @@ -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, @@ -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); + } }