feat(ipc): include fetchSource on attachment-preview responses

request-attachment-preview now forwards preview.fetchSource at the top level
of attachment-preview so the Pear UI can show P2P mesh provenance without
parsing nested preview fields.

Phase 60 / v0.8.25.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-22 00:36:16 -04:00
co-authored by Cursor
parent 8f5958db9a
commit b552b9cb19
+5 -1
View File
@@ -334,7 +334,11 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
}
if (t === 'request-attachment-preview') {
const preview = await platform.readAttachmentPreview(msg.attachmentId)
send({ type: 'attachment-preview', preview })
send({
type: 'attachment-preview',
preview,
fetchSource: preview?.fetchSource || null
})
return true
}
if (t === 'upsert-guild-emoji') {