Log leave-voice noop and add format-settings-deep-link IPC.
Skip pushState when leaveVoiceChannel returns null; format settings URLs for the desktop copy-link flow. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -575,8 +575,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
return true
|
||||
}
|
||||
if (t === 'leave-voice') {
|
||||
await platform.leaveVoiceChannel()
|
||||
const payload = await platform.leaveVoiceChannel()
|
||||
resetVoiceCaptureTrace()
|
||||
if (!payload) {
|
||||
log.debug('leave-voice noop', { reason: 'not in voice channel' })
|
||||
return true
|
||||
}
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
@@ -724,6 +728,14 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
send({ type: 'guild-deep-link', url, guildId: msg.guildId, channelId: msg.channelId || null })
|
||||
return true
|
||||
}
|
||||
if (t === 'format-settings-deep-link') {
|
||||
const url = platform.formatSettingsDeepLink({
|
||||
section: msg.section,
|
||||
scope: msg.scope
|
||||
})
|
||||
send({ type: 'settings-deep-link', url, section: msg.section || null, scope: msg.scope || 'user' })
|
||||
return true
|
||||
}
|
||||
if (t === 'mark-notification-read') {
|
||||
await platform.notifications?.markRead(msg.notificationId)
|
||||
pushState()
|
||||
|
||||
Reference in New Issue
Block a user