From d5b1bebe8736244bb71d8beb64ae6a64edec9112 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Wed, 30 Aug 2023 19:57:00 +0800 Subject: [PATCH] fix(route): Fix Discourse link (#13167) --- lib/v2/discourse/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/v2/discourse/notifications.js b/lib/v2/discourse/notifications.js index b781f3d04..45c35f116 100644 --- a/lib/v2/discourse/notifications.js +++ b/lib/v2/discourse/notifications.js @@ -7,7 +7,7 @@ module.exports = async (ctx) => { const response = await got(`${link}/notifications.json`, { headers: { 'User-Api-Key': key } }).json(); const items = response.notifications.map((e) => ({ title: e.fancy_title ?? e.data.badge_name, - link: `${link}/${e.data.hasOwnProperty('badge_id') ? `badges/${e.data.badge_id}/${e.data.badge_slug}?username=${e.data.username}` : `${e.topic_id}/${e.post_number}`}`, + link: `${link}/${e.data.hasOwnProperty('badge_id') ? `badges/${e.data.badge_id}/${e.data.badge_slug}?username=${e.data.username}` : `t/topic/${e.topic_id}/${e.post_number}`}`, pubDate: new Date(e.created_at), author: e.data.display_username ?? e.data.username, category: `notification_type:${e.notification_type}`,