Changeset 6d5ce0c in Klonkt for src/services/guardianship/handshake.js
- Timestamp:
- 07/29/2026 10:50:32 AM (6 weeks ago)
- Branches:
- main
- Children:
- 08ab8ad
- Parents:
- c8e03c6
- File:
-
- 1 edited
-
src/services/guardianship/handshake.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/guardianship/handshake.js
rc8e03c6 r6d5ce0c 219 219 const lp = availability.parseLapse(activity.object); 220 220 if (lp) { 221 // ONE path (Robins regel, 29-7): the ward's server opens, tallies and 222 // enforces, wherever it lives. A local ward is reached by the same 223 // deliverTo, which loops back into the inbox handler; co-location is a 224 // transport detail and never a shortcut past the decision. 221 225 const id = `${me}/lapses/${Date.now().toString(36)}${Math.floor(Math.random() * 1e4).toString(36)}`; 222 const wardSlug = deps.localSlug(lp.ward);223 if (wardSlug) {224 const r = availability.openLapse({ id, wardSlug, wardUri: lp.ward, target: lp.target, openedBy: me, now: Date.now() });225 if (r.error) return { status: r.error === 'not_in_available_set' ? 403 : 409, error: r.error };226 deps.deliverTo(site, lp.target, { id, type: 'Offer', actor: me, to: [lp.target], object: { type: 'shaer:Lapse', 'shaer:ward': lp.ward, object: lp.target } }).catch(() => { /* best-effort */ });227 notify(wardSlug, { kind: 'lapse_opened', lapse: id, target: lp.target, set: r.set });228 return { status: 202, id, url: id, 'shaer:set': r.set, 'shaer:threshold': r.threshold };229 }230 226 const offer = { id, type: 'Offer', actor: me, to: [lp.ward], object: { type: 'shaer:Lapse', 'shaer:ward': lp.ward, object: lp.target } }; 231 227 const delivered = await fanout(site, [lp.ward], offer);
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)