diff options
| author | Fuwn <[email protected]> | 2023-09-17 22:50:42 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-09-17 22:50:42 -0700 |
| commit | 672f700271ee935ea9f6bf66802517e720c3c097 (patch) | |
| tree | 4a0e9ec0456a6d8d27863dd70bd0ae04226af310 /src/routes/feeds | |
| parent | feat(anime): bold if releasing soon (diff) | |
| download | due.moe-672f700271ee935ea9f6bf66802517e720c3c097.tar.xz due.moe-672f700271ee935ea9f6bf66802517e720c3c097.zip | |
feat(notifications): link to activity
Diffstat (limited to 'src/routes/feeds')
| -rw-r--r-- | src/routes/feeds/activity-notifications/+server.ts | 7 |
1 files changed, 6 insertions, 1 deletions
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}`; } |