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:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user