Changeset f1e0c1f in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/25/2026 07:08:31 AM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
5085b1d
Parents:
75bda38
Message:

fediverse: push actor Update on pin/unpin so Mastodon refreshes the featured collection

Mastodon only re-fetches an actor's featured (pinned) collection on actor refresh, and
there is no 'featured changed' activity. deliverActorUpdate sends Update(Person) to
followers; /save fires it when a post's pin rank changes → pins propagate promptly.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r75bda38 rf1e0c1f  
    365365    if (post.status !== 'published') ActivityPubService.deliverCreate(site, apPost).catch(() => { /* best-effort */ });
    366366    else ActivityPubService.deliverUpdate(site, apPost).catch(() => { /* best-effort */ });
     367  }
     368
     369  // Pin/unpin changed → push an actor Update so Mastodon re-fetches the featured
     370  // (pinned) collection promptly instead of waiting for its own actor refresh.
     371  if ((post.pinned || 0) !== parsePinnedRank(pinned)) {
     372    ActivityPubService.deliverActorUpdate(site).catch(() => { /* best-effort */ });
    367373  }
    368374
Note: See TracChangeset for help on using the changeset viewer.