Changeset e311202 in Klonkt for src/routes/activitypub.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/activitypub.js

    rbb9e54c re311202  
    12581258  // cannot_resolve_inReplyTo. Strangers still get the exact same 404, so a
    12591259  // note's existence stays as private as before.
     1260  // EEN GEBLOKKEERDE KRIJGT DE DEUR DICHT (Robin, 21-8), net als bij de outbox:
     1261  // wie ondertekend aanklopt, klopt met zijn naam erop, en een blokkade is een
     1262  // gesloten deur. Dezelfde 404 als een vreemde, zodat het bestaan van een note
     1263  // niets extra's verraadt. Onbetekende verzoeken kunnen we niet thuisbrengen
     1264  // en houden de publieke weergave -- daarvoor is de Block-bezorging.
     1265  if (req.headers['signature']) {
     1266    const wie = await AP.verifyRequest(req).catch(() => null);
     1267    if (wie && wie.id && AP.isBlockedAny(wie.id)) return res.status(404).end();
     1268  }
    12601269  const post = db.prepare(
    12611270    "SELECT * FROM posts WHERE id = ? AND status = 'published'"
Note: See TracChangeset for help on using the changeset viewer.