feat(ui-flow): staged attachment meta and reorder IPC

Handle update-staged-attachment-meta, reorder-staged-attachments, and
attachmentUiById on send-message.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-02 15:49:51 -04:00
co-authored by Cursor
parent 59bea992a2
commit 9e04b10dbc
+14
View File
@@ -995,12 +995,26 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
}
return true
}
if (t === 'update-staged-attachment-meta') {
await platform.updateStagedAttachmentMeta(msg.attachmentId, {
caption: msg.caption,
spoiler: !!msg.spoiler
})
pushState()
return true
}
if (t === 'reorder-staged-attachments') {
await platform.reorderStagedAttachments(msg.orderedIds || [])
pushState()
return true
}
if (t === 'send-message') {
const trimmed = String(msg.content || '').trim()
const slashMatch = trimmed.match(/^\/([a-z0-9_-]+)/i)
await platform.sendMessage(msg.content, {
replyToId: msg.replyToId,
attachmentIds: msg.attachmentIds,
attachmentUiById: msg.attachmentUiById,
stickerNames: msg.stickerNames
})
if (platform.activeChannelId && platform.mode === 'guild') {