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


Ignore:
Timestamp:
08/21/2026 08:44:47 AM (3 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
4e5fe29
Parents:
bb9e54c
Message:

A block now leaves the house: Block out, Undo(Block) back

Blocking was purely local — row in ap_blocks, purge the cached content,
drop the follower — and the other side never heard about it. The hub
kept the channel and every post, because nothing told it and its
unsigned crawl kept reading the public outbox (seen on dev.klonkt.com,
21-8).

Now blocking delivers a Block to the blocked actor's inbox and
unblocking an Undo(Block), so the way back stays open. Delivery can
never hold up the block itself: the row is written first and a
failed delivery is swallowed. Domain blocks send nothing — no inbox to
address.

Second door: a signed reader we block gets the same 404 on /ap/notes/:id
that a stranger gets, matching what the outbox already did. Unsigned
callers stay anonymous to us and keep the public view; that is what the
Block delivery is for.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    rbb9e54c re311202  
    15341534router.post('/blocking/remove', requireSiteManager, (req, res) => {
    15351535  const site = res.locals.site;
    1536   if (site) { try { ActivityPubService.unblock(site, (req.body.target || '').toString()); } catch (e) { /* ignore */ } }
     1536  if (site) { try { ActivityPubService.unblock(site, (req.body.target || '').toString()).catch(() => {}); } catch (e) { /* ignore */ } }
    15371537  res.redirect('/blocking?success=' + encodeURIComponent('Deblokkeerd'));
    15381538});
Note: See TracChangeset for help on using the changeset viewer.