Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 키워드 알림 schemeUri변경 #1084

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}
Loading