Changeset f1e0c1f in Klonkt for src/services/ActivityPubService.js
- Timestamp:
- 06/25/2026 07:08:31 AM (3 months ago)
- Branches:
- main
- Children:
- 5085b1d
- Parents:
- 75bda38
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
r75bda38 rf1e0c1f 651 651 type: 'Update', actor: me, to: [PUBLIC], cc: [`${me}/followers`], 652 652 object: note, 653 }; 654 for (const inbox of inboxes) deliverWithRetry(site.slug, inbox, update, `${me}#main-key`, keys.private_pem); 655 } 656 657 // Tell followers the ACTOR changed (Update + Person) so Mastodon re-processes the 658 // account AND re-fetches the featured (pinned) collection — there is no standard 659 // "featured changed" activity, so this is how a pin/unpin propagates promptly. 660 export async function deliverActorUpdate(site) { 661 const base = (process.env.PUBLIC_BASE_URL || '').replace(/\/+$/, ''); 662 if (!base || !site || !site.slug) return; 663 const followers = fStmts().list.all(site.slug); 664 if (!followers.length) return; 665 const inboxes = [...new Set(followers.map((f) => f.shared_inbox || f.inbox).filter(Boolean))]; 666 const keys = getOrCreateKeys(site.slug); 667 const me = actorId(base, site.slug); 668 const update = { 669 '@context': ['https://www.w3.org/ns/activitystreams', 'https://w3id.org/security/v1'], 670 id: `${me}#update-${Date.now()}`, 671 type: 'Update', actor: me, to: [PUBLIC], cc: [`${me}/followers`], 672 object: buildActor(base, site), 653 673 }; 654 674 for (const inbox of inboxes) deliverWithRetry(site.slug, inbox, update, `${me}#main-key`, keys.private_pem); … … 985 1005 getOrCreateKeys, apWants, sendAP, actorId, noteId, 986 1006 buildActor, buildNote, buildCreate, buildOutbox, buildFollowers, buildFeatured, 987 followerCount, deliver, fetchActor, verifyRequest, handleInbox, deliverCreate, deliverDelete, deliverUpdate, 1007 followerCount, deliver, fetchActor, verifyRequest, handleInbox, deliverCreate, deliverDelete, deliverUpdate, deliverActorUpdate, 988 1008 getInteractions, getInteractionById, buildReplyNote, getOutboxNote, deliverReply, resolveRemoteNote, 989 1009 listOutbox, deliverOutboxDelete,
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)