Changeset eb852c5 in Klonkt for src/routes


Ignore:
Timestamp:
06/24/2026 11:22:49 AM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
c16e0a5
Parents:
5a93ac0
Message:

feat(activitypub): federate post deletions (Delete + Tombstone)

Deleting a published, non-fan-only post now sends a Delete activity (Tombstone)
to followers' inboxes, so it's removed from their Mastodon feeds instead of being
orphaned.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r5a93ac0 reb852c5  
    369369  if (!PermissionsService.canDeletePost(req.session.user, post, site)) {
    370370    return res.status(403).send('No permission');
     371  }
     372
     373  // ActivityPub: tell followers the post is gone (Delete + Tombstone), but only
     374  // if it was actually federated (published + not fan-only). Fire before the row
     375  // is removed — we still have post.id (= the Note id).
     376  if (post.status === 'published' && !post.fan_only) {
     377    ActivityPubService.deliverDelete(site, post).catch(() => { /* best-effort */ });
    371378  }
    372379
Note: See TracChangeset for help on using the changeset viewer.