feat(ui-flow): set-activity, clear-activity, and presence activity IPC
Handle set-presence activity field plus dedicated set-activity and clear-activity messages for the status modal Now Playing controls. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -292,7 +292,18 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
}
|
||||
if (t === 'set-presence') {
|
||||
const custom = msg.customStatus !== undefined ? msg.customStatus : undefined
|
||||
platform.setPresence(msg.status || USER_STATUS.ONLINE, custom)
|
||||
const activity = msg.activity !== undefined ? msg.activity : undefined
|
||||
platform.setPresence(msg.status || USER_STATUS.ONLINE, custom, activity)
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'set-activity') {
|
||||
platform.setActivity(msg.activity ?? null)
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'clear-activity') {
|
||||
platform.setActivity(null)
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user