File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/webapp/src/hooks Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -258,11 +258,11 @@ export function useMessageSender() {
258258 targetDid,
259259 } )
260260
261- // Wire format: `local:<objectKey>` — resolved by the receiver via their own node URL.
262- // The P2P relay (relayAttachment above) pushes the file to the receiver's ClawNet node,
263- // so the receiver serves it at their own nodeUrl. MessageBubble.resolveAttachmentUrl( )
264- // expands this schema into a full URL at render time .
265- const rawPayloadText = `local: ${ initialized . objectKey } `
261+ // Wire format: sender's public URL so the receiver can always fetch the image
262+ // directly from the sender's node — no dependency on P2P relay completing first.
263+ // P2P relay still runs in the background (triggered by targetDid in completeAttachmentUpload )
264+ // and if it succeeds the receiver's node will also have a local copy for faster future access .
265+ const rawPayloadText = `${ nodeUrl . replace ( / \/ $ / , "" ) } /api/v1/attachments/ ${ encodeURIComponent ( initialized . objectKey ) } `
266266 const displayText = contentType === "image"
267267 ? URL . createObjectURL ( input . file ) // local blob for sender's immediate preview
268268 : input . file . name
You can’t perform that action at this time.
0 commit comments