Skip to content

Commit

Permalink
fix(route/discourse): Mark whether the notification is read. (#16282)
Browse files Browse the repository at this point in the history
* fix(route/discourse): Mark whether the notification is read.

* Update notifications.ts
  • Loading branch information
dzx-dzx authored Jul 29, 2024
1 parent a62667f commit ad5e52b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/routes/discourse/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}));

Expand All @@ -64,5 +64,6 @@ async function handler(ctx) {
title: `${about.title} - Notifications`,
description: about.description,
item: items,
allowEmpty: true,
};
}

0 comments on commit ad5e52b

Please sign in to comment.