aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-03 15:07:53 -0800
committerFuwn <[email protected]>2024-01-03 15:08:06 -0800
commit4abe3f30074075e00c2a3f0e40014050ad459bed (patch)
tree6dd78b58b0fcf8cfd7d0daa5aca8cfdbdce0401d
parentfix(badges): not found user error (diff)
downloaddue.moe-4abe3f30074075e00c2a3f0e40014050ad459bed.tar.xz
due.moe-4abe3f30074075e00c2a3f0e40014050ad459bed.zip
fix(feeds): seperate threads and activities
-rw-r--r--src/routes/feeds/activity-notifications/+server.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/routes/feeds/activity-notifications/+server.ts b/src/routes/feeds/activity-notifications/+server.ts
index ca1464bd..32a626a7 100644
--- a/src/routes/feeds/activity-notifications/+server.ts
+++ b/src/routes/feeds/activity-notifications/+server.ts
@@ -39,8 +39,10 @@ const render = (posts: Notification[] = []) => `<?xml version="1.0" encoding="UT
) {
link = `https://anilist.co/activity/${notification.activity.id}`;
} else if (notification.type.toString().includes('THREAD')) {
- title += `${notification.thread.title || notification.thread.id}`;
- link = `https://anilist.co/forum/thread/${notification.thread.id}`;
+ 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>