fix(mesh): resolve ContentRef peer via DID + name-match fallback

Mesh peer pubkeys (LoRa advert ed25519) differ from federation node
pubkeys (archipelago identity), so matching on pubkey always missed
and attachments >160B had no transport. Match on master DID instead;
also accept an explicit peer_onion override from the frontend, which
resolves the peer by display name against federation.list-nodes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-04-13 14:13:36 -04:00
parent bc3729d99f
commit 002032b7da
4 changed files with 74 additions and 18 deletions

View File

@@ -382,13 +382,13 @@ export const useMeshStore = defineStore('mesh', () => {
}
}
async function sendContent(contactId: number, cid: string, caption?: string) {
async function sendContent(contactId: number, cid: string, caption?: string, peerOnion?: string) {
try {
sending.value = true
error.value = null
const res = await rpcClient.call<{ sent: boolean; message_id: number; cid: string; size: number }>({
method: 'mesh.send-content',
params: { contact_id: contactId, cid, caption },
params: { contact_id: contactId, cid, caption, peer_onion: peerOnion },
})
if (res.sent) await fetchMessages()
return res