aboutsummaryrefslogtreecommitdiff
path: root/src/routes/feeds
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-03 19:02:45 -0800
committerFuwn <[email protected]>2024-01-03 19:02:45 -0800
commit88f6d2dd5166245900c4ba6652f820da2f3c642c (patch)
tree85ddc1e0c61aad6d67e533b1c44a5b91e5c078ce /src/routes/feeds
parentfix(settings): vercel commit sha (diff)
downloaddue.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.ts15
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>