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