From 672f700271ee935ea9f6bf66802517e720c3c097 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 17 Sep 2023 22:50:42 -0700 Subject: feat(notifications): link to activity --- src/routes/feeds/activity-notifications/+server.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/routes') diff --git a/src/routes/feeds/activity-notifications/+server.ts b/src/routes/feeds/activity-notifications/+server.ts index e72482e8..94ff60c0 100644 --- a/src/routes/feeds/activity-notifications/+server.ts +++ b/src/routes/feeds/activity-notifications/+server.ts @@ -29,7 +29,12 @@ export const GET = async ({ url }) => { return text.charAt(0).toUpperCase() + text.substr(1).toLowerCase(); }); - if (notification.type.toString().includes('THREAD')) { + if ( + !['FOLLOWING', 'ACTIVITY_MESSAGE'].includes(notification.type.toString()) && + !notification.type.toString().includes('THREAD') + ) { + link = `https://anilist.co/activity/${notification.activity.id}`; + } else if (notification.type.toString().includes('THREAD')) { title += `${notification.thread.title}`; link = `https://anilist.co/forum/thread/${notification.thread.id}`; } -- cgit v1.2.3