feat(ipc): automation hook and manifest export/import dispatch
Handle upsert-automation-hook, delete-automation-hook, export-automation-manifest, and import-automation-manifest UI messages for server settings. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -78,6 +78,28 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'upsert-automation-hook') {
|
||||
await platform.upsertAutomationHook(msg.hook || {})
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'delete-automation-hook') {
|
||||
await platform.deleteAutomationHook(msg.hookId)
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'export-automation-manifest') {
|
||||
const manifest = await platform.exportAutomationManifest()
|
||||
send({ type: 'automation-manifest', manifest })
|
||||
return true
|
||||
}
|
||||
if (t === 'import-automation-manifest') {
|
||||
await platform.importAutomationManifest(msg.manifest || {}, {
|
||||
merge: msg.merge !== false
|
||||
})
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'set-announcement-crosspost') {
|
||||
await platform.setAnnouncementCrosspostTargets(
|
||||
msg.channelId,
|
||||
|
||||
Reference in New Issue
Block a user