fix(route/discourse): Mark whether the notification is read. (#16282)

* fix(route/discourse): Mark whether the notification is read.

* Update notifications.ts
This commit is contained in:
Andvari 2024-07-29 21:57:47 +08:00 committed by GitHub
parent a62667f07f
commit ad5e52b51b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,7 @@ async function handler(ctx) {
link: `${link}/${Object.hasOwn(e.data, '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}`,
category: [`notification_type:${e.notification_type}`, `read:${e.read}`, `high_priority:${e.high_priority}`],
original_post_id: e.data.original_post_id,
}));
@ -64,5 +64,6 @@ async function handler(ctx) {
title: `${about.title} - Notifications`,
description: about.description,
item: items,
allowEmpty: true,
};
}