Ignore:
Timestamp:
06/27/2026 01:04:55 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
dcff893
Parents:
e390844
Message:

feat(fedi): fans-only = followers-only federation (option A)

A fan_only post now federates to your followers but addressed followers-only (to:
followers, no Public) so only they see it in their feed and it can't be boosted public.
buildNote sets the audience from post.fan_only; create/save/scheduler/delete hooks no
longer skip fan_only (they pass fan_only through). The public outbox still excludes
fan_only, and the on-site fan-gate is unchanged (so it stays hidden on the site).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/services/ActivityPubService.js

    re390844 r80c36a1  
    240240    url: human,
    241241    published: new Date(post.published_at || post.created_at || Date.now()).toISOString(),
    242     to: [PUBLIC],
    243     cc: [`${aId}/followers`],
     242    // fan_only = "fans only" → followers-only visibility (delivered to your followers
     243    // but not addressed to Public, so Mastodon shows it only to them and can't boost it).
     244    to: post.fan_only ? [`${aId}/followers`] : [PUBLIC],
     245    cc: post.fan_only ? [] : [`${aId}/followers`],
    244246    tag: Array.isArray(post.tags) ? post.tags.map((t) => ({ type: 'Hashtag', name: '#' + String(t).replace(/\s+/g, '') })) : [],
    245247    replies: `${id}/replies`,
Note: See TracChangeset for help on using the changeset viewer.