Changeset c26cc18 in Klonkt for src/services/guardianship/handshake.js
- Timestamp:
- 07/24/2026 06:04:03 PM (7 weeks ago)
- Branches:
- main
- Children:
- 780a7c6
- Parents:
- 1a2d8ac
- File:
-
- 1 edited
-
src/services/guardianship/handshake.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/guardianship/handshake.js
r1a2d8ac rc26cc18 56 56 }; 57 57 relations.recordOffer(site.slug, 'guardian', rel.ward, { handle: deriveHandle(rel.ward), offerId }); 58 const delivered = await deliverTo(site, rel.ward, offer).catch(() => false); 58 // The offer is now recorded (the guardian sees it as pending); delivery is 59 // async + retried, so a slow ward server never fails the whole action. 60 const res = await deliverTo(site, rel.ward, offer).catch(() => ({ delivered: false })); 59 61 notify(site.slug, { kind: 'offer_sent', ward: rel.ward }); 60 return { status: delivered ? 202 : 502, id: offerId, url: offerId};62 return { status: 202, id: offerId, url: offerId, delivered: res && res.delivered !== false }; 61 63 } 62 64 … … 82 84 relations.removeRelation(site.slug, 'ward', row.other_uri); 83 85 } 84 const delivered = await deliverTo(site, row.other_uri, answer).catch(() => false); 86 // The answer is committed locally; delivery is async + retried. 87 const res = await deliverTo(site, row.other_uri, answer).catch(() => ({ delivered: false })); 85 88 notify(site.slug, { kind: type === 'Accept' ? 'offer_accepted' : 'offer_rejected', guardian: row.other_uri }); 86 return { status: delivered ? 202 : 502, id: answer.id, url: answer.id};89 return { status: 202, id: answer.id, url: answer.id, delivered: res && res.delivered !== false }; 87 90 } 88 91
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)