Changeset bfa6fa1 in Klonkt for src/services/ActivityPubService.js
- Timestamp:
- 07/31/2026 06:02:01 PM (6 weeks ago)
- Branches:
- main
- Children:
- 72ec6a4
- Parents:
- 0ca7e9a4
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r0ca7e9a4 rbfa6fa1 234 234 } 235 235 } catch { /* skip malformed ap_aliases */ } 236 // FEP-7628 slice 3: this account moved. The old actor stays online AS A 237 // SIGNPOST — that is the whole point of keeping it: whoever missed the Move 238 // activity (offline server, later visitor) still learns where we went by 239 // fetching us. Per the FEP the moved actor "should be considered inactive", 240 // and publishers should stop delivering here. 241 if (site.moved_to && /^https?:\/\//i.test(String(site.moved_to))) actor.movedTo = String(site.moved_to); 236 242 // Profile links → PropertyValue rows: Mastodon/PeerTube/WordPress-ActivityPub render these as 237 243 // profile metadata (rel=me enables link-back verification). Additive; ignored by simpler receivers. … … 3892 3898 to: [`${me}/followers`], 3893 3899 }; 3900 // FEP-7628: after setting movedTo, notify the followers with an Update of 3901 // the actor, so their servers hold the signpost even if the Move itself is 3902 // lost. Built from the FRESH row: `site` still carries the pre-move values. 3903 const movedSite = db.prepare('SELECT * FROM sites WHERE slug = ?').get(site.slug) || { ...site, moved_to: target.id }; 3904 const update = { 3905 '@context': AP_CONTEXT, 3906 id: `${me}#update-${Date.now()}-${rid()}`, 3907 type: 'Update', actor: me, to: [PUBLIC], cc: [`${me}/followers`], 3908 object: buildActor(base, movedSite), 3909 published: new Date().toISOString(), 3910 }; 3894 3911 const inboxes = [...new Set(fStmts().list.all(site.slug).map((f) => f.shared_inbox || f.inbox).filter(Boolean))]; 3912 const send = deliverFn || deliverWithRetry; 3895 3913 for (const inbox of inboxes) { 3896 await (deliverFn || deliverWithRetry)(site.slug, inbox, move, `${me}#main-key`, keys.private_pem); 3914 await send(site.slug, inbox, update, `${me}#main-key`, keys.private_pem); 3915 await send(site.slug, inbox, move, `${me}#main-key`, keys.private_pem); 3897 3916 } 3898 3917 console.log('[AP] MOVE announced:', site.slug, '→', target.id, 'naar', inboxes.length, 'inbox(en)');
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)