diff options
| author | Fuwn <[email protected]> | 2024-01-03 19:02:45 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-03 19:02:45 -0800 |
| commit | 88f6d2dd5166245900c4ba6652f820da2f3c642c (patch) | |
| tree | 85ddc1e0c61aad6d67e533b1c44a5b91e5c078ce /src/routes/feeds | |
| parent | fix(settings): vercel commit sha (diff) | |
| download | due.moe-88f6d2dd5166245900c4ba6652f820da2f3c642c.tar.xz due.moe-88f6d2dd5166245900c4ba6652f820da2f3c642c.zip | |
fix(feeds): simple link and title
Diffstat (limited to 'src/routes/feeds')
| -rw-r--r-- | src/routes/feeds/activity-notifications/+server.ts | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/routes/feeds/activity-notifications/+server.ts b/src/routes/feeds/activity-notifications/+server.ts index 32a626a7..0cdc3bc1 100644 --- a/src/routes/feeds/activity-notifications/+server.ts +++ b/src/routes/feeds/activity-notifications/+server.ts @@ -33,17 +33,12 @@ const render = (posts: Notification[] = []) => `<?xml version="1.0" encoding="UT return text.charAt(0).toUpperCase() + text.substr(1).toLowerCase(); }); - 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')) { + link = `https://anilist.co/${notification.thread ? 'forum/thread' : 'activity'}/${ + notification.thread ? notification.thread.id : notification.activity.id + }`; + + if (notification.type.toString().includes('THREAD')) title += `${notification.thread ? notification.thread.title : notification.activity.id}`; - link = `https://anilist.co/${notification.thread ? 'forum/thread' : 'activity'}/${ - notification.thread ? notification.thread.id : notification.activity.id - }`; - } return `<item> <guid isPermaLink="false">${notification.id}</guid> |