Changeset 81b2e1e in Klonkt for src/config/database.js


Ignore:
Timestamp:
07/20/2026 09:38:41 PM (7 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
024f4f8
Parents:
0cea12b
git-author:
Robin <roboburr@…> (07/20/2026 09:38:40 PM)
git-committer:
Robin <roboburr@…> (07/20/2026 09:38:41 PM)
Message:

Feature: C2S posts honor to/cc visibility (shaer-60b wire)

A note POSTed over C2S now federates the way it is addressed instead
of always going loud-public. Public in to = public; Public in cc =
quiet public (unlisted: followers in to, Public in cc on the built
note); followers-only = friends, riding the existing fan_only pipeline
(followers-only delivery + web gating); mention-only addressing =
direct, stored followers-gated and kept local until mention addressing
lands in the client. No addressing at all keeps the legacy public
behavior. Visibility is stored in the new additive posts.ap_visibility
column.

Changed files:
src/services/ActivityPubService.js

  • c2sVisibility(object): addressing -> bucket
  • c2sCreatePost stores ap_visibility + fan_only mapping, skips federation for direct
  • buildNote: quiet -> to followers, Public in cc

src/config/database.js

  • additive column posts.ap_visibility

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

  • bucket mapping, quiet addressing, friends never Public

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config/database.js

    r0cea12b r81b2e1e  
    440440  // Rich replies: JSON array [{url, mediaType, name}] → `attachment` on the Note.
    441441  ensureColumn('ap_outbox', 'attachments', 'TEXT');
     442  ensureColumn('posts', 'ap_visibility', 'TEXT');   // public|quiet|friends|direct (C2S addressing, shaer-60b)
    442443}
    443444
Note: See TracChangeset for help on using the changeset viewer.