Changeset 4c70ecb in Klonkt for test


Ignore:
Timestamp:
07/21/2026 11:44:49 PM (7 weeks ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
8b07c12
Parents:
fb30b5d
Message:

C2S Block and Undo(Block): Shaer's Orbit becomes a real server block

Putting someone "in Orbit" in Shaer was client-side only. The C2S outbox
now accepts Block and Undo(Block), wired onto the same blockTarget/unblock
the web UI uses: the actor lands in ap_blocks, shows up in the Block tab,
and their cached content is purged. Releasing from Orbit undoes it.

Changed files:
src/services/ActivityPubService.js

  • ingestOutboxActivity: case 'Block' -> blockTarget(site, uri), 202
  • Undo with inner Block -> unblock(site, uri), 202

New file:
test/c2s-block.test.js

  • Block lands in ap_blocks, Undo releases, missing object is 400

Changed files:
test/c2s-outbox.test.js

  • the unsupported-Undo example was Block; that is real now, the test uses Move instead

151 tests, all green.

-robo
Co-Authored-By: Claude Opus 4.8 <noreply@…>

Location:
test
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • test/c2s-outbox.test.js

    rfb30b5d r4c70ecb  
    6767
    6868test('Undo of an unknown inner type → 400', async () => {
    69   const out = await AP.ingestOutboxActivity(site, user, { type: 'Undo', object: { type: 'Block', object: 'x' } });
     69  // Block used to be the unsupported example; it is real now (c2s-block.test).
     70  const out = await AP.ingestOutboxActivity(site, user, { type: 'Undo', object: { type: 'Move', object: 'x' } });
    7071  assert.equal(out.status, 400);
    7172  assert.equal(out.error, 'unsupported_undo');
Note: See TracChangeset for help on using the changeset viewer.