feat(ipc): navigate-deep-link, format-message-deep-link, mark-notification-read

Wire deep link navigation and single-notification read for inbox jumps.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-22 02:05:03 -04:00
co-authored by Cursor
parent 63c8bf041d
commit fa6079a4b6
+19
View File
@@ -252,6 +252,25 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
send({ type: 'jump-to-message-result', ...result })
return true
}
if (t === 'navigate-deep-link') {
const result = await platform.navigateDeepLink(msg.url)
pushState()
send({ type: 'jump-to-message-result', ...result })
return true
}
if (t === 'format-message-deep-link') {
const url = platform.formatMessageDeepLink(msg.messageId, {
channelId: msg.channelId,
guildId: msg.guildId
})
send({ type: 'message-deep-link', url, messageId: msg.messageId })
return true
}
if (t === 'mark-notification-read') {
await platform.notifications?.markRead(msg.notificationId)
pushState()
return true
}
if (t === 'set-presence') {
const custom = msg.customStatus !== undefined ? msg.customStatus : undefined
platform.setPresence(msg.status || USER_STATUS.ONLINE, custom)