Changeset e6c6e6f in Klonkt for test/c2s-visibility.test.js

Timestamp:
07/20/2026 10:27:19 PM (7 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
155c24e
Parents:
024f4f8
git-author:
Robin <roboburr@…> (07/20/2026 10:27:18 PM)
git-committer:
Robin <roboburr@…> (07/20/2026 10:27:19 PM)
Message:

Feature: uploadMedia endpoint + attachments on direct notes

The actor has been advertising endpoints.uploadMedia without a route
behind it; this implements it. A bearer scoped to the site POSTs one
image/audio/video (multipart field "file", the AP C2S convention) into
the reply-media store and gets { url, mediaType, name } back. Direct
notes (private mentions) now carry attachments through the same
deliverReply-style validation (own /media/ uploads only, max 4), so
the help-buoy capture rides a DM to the guardians while the note stays
direct: recipients only, empty cc, unboostable.

Changed files:
src/routes/activitypub.js

  • POST /ap/users/:slug/uploadMedia (bearer-gated, multer, 32MB)

src/services/ActivityPubService.js

  • ingest passes AS2 attachments into the direct path (absolute own-base URLs normalized to relative)
  • deliverDirectNote validates + stores attachments

New file: (none)
test/c2s-direct.test.js

  • direct note renders its attachment, addressing stays direct

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

(No files)

Note: See TracChangeset for help on using the changeset viewer.