feat(ui-flow): emit mark-notification-read-cleared for desktop unread dismiss

After markRead, push mark-notification-read-cleared with guild and channel ids
so desktop can dismiss channel unread desktop notifications.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-23 09:27:25 -04:00
co-authored by Cursor
parent 20dfeb5156
commit 5084311160
+8 -1
View File
@@ -744,8 +744,15 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
return true
}
if (t === 'mark-notification-read') {
await platform.notifications?.markRead(msg.notificationId)
const row = await platform.notifications?.markRead(msg.notificationId)
pushState()
if (row?.channelId) {
send({
type: 'mark-notification-read-cleared',
guildId: row.guildId || platform.guild?.guild?.id || null,
channelId: row.channelId
})
}
return true
}
if (t === 'open-notification') {