Ignore:
Timestamp:
06/26/2026 01:26:39 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
73045f9
Parents:
98ceadd
Message:

refactor(fedi): remove the 'boost latest 5' feature

Dropped at Robin's request. Featuring an account is now purely local (Cirkel) — the
only way to boost to the fediverse is the deliberate per-post 🔁. Removed: the boost5
checkbox + explain line on /volgend, the boost5 branch in /tijdlijn/follow, the
boostLatestN function + export, and the tl.boost5_* i18n keys (nl/en/de).

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/services/ActivityPubService.js

    r98ceadd rfda08c2  
    666666        const media = JSON.stringify(_atts);
    667667        // "Feature" = show in the Cirkel (local only). We do NOT auto-Announce
    668         // incoming posts to the fediverse — that flooded followers (esp. on the
    669         // initial backfill). Boosting to the fediverse is a deliberate, one-time
    670         // "boost the latest 5" action at feature time (see boostLatestN).
     668        // incoming posts to the fediverse — that flooded followers. Boosting to the
     669        // fediverse is only ever a deliberate, manual per-post action (the 🔁 on
     670        // the timeline).
    671671        for (const s of subs) {
    672672          tlStmts().ins.run(o.id, s.slug, actorUri, ai.name, ai.handle, ai.icon, ai.url, html, o.url || null, o.published || null, media);
     
    12441244}
    12451245
    1246 // One-time "boost the latest N posts" of an account to the fediverse — the
    1247 // deliberate, bounded alternative to auto-boosting every post. Opt-in at feature
    1248 // time so featuring an artist never floods your followers with their whole backlog.
    1249 export async function boostLatestN(site, actorUrl, n = 5) {
    1250   try {
    1251     const actor = await fetchActor(actorUrl).catch(() => null);
    1252     if (!actor || !actor.outbox) return { ok: false, boosted: 0 };
    1253     const getJson = async (u) => { try { const r = await fetch(u, { headers: { Accept: 'application/activity+json' } }); return r.ok ? await r.json() : null; } catch { return null; } };
    1254     let coll = await getJson(actor.outbox);
    1255     let items = (coll && coll.orderedItems) || [];
    1256     if (!items.length && coll && coll.first) {
    1257       const page = typeof coll.first === 'string' ? await getJson(coll.first) : coll.first;
    1258       items = (page && page.orderedItems) || [];
    1259     }
    1260     const noteIds = items
    1261       .filter((it) => it && it.type === 'Create' && it.object)
    1262       .map((it) => (typeof it.object === 'string' ? it.object : it.object.id))
    1263       .filter(Boolean)
    1264       .slice(0, n); // outbox is newest-first → the latest N
    1265     let boosted = 0;
    1266     for (const id of noteIds) { try { const r = await sendInteraction(site, 'boost', id, actorUrl); if (r && r.ok) boosted++; } catch { /* best-effort */ } }
    1267     return { ok: true, boosted };
    1268   } catch { return { ok: false, boosted: 0 }; }
    1269 }
    1270 
    12711246// Notifications inbox: new followers + replies/likes/boosts on this site's posts.
    12721247export function getNotifications(slug, limit) {
     
    13551330  listOutbox, deliverOutboxDelete,
    13561331  webfingerResolve, followActor, resolveRemoteActor, unfollowActor, listFollowing, setAutoBoost, getTimeline, sendInteraction,
    1357   autoBoostCount, boostedCount, markBoosted, unmarkBoosted, getCirkelPosts, getCirkelMembers, selfHealTimeline, boostLatestN,
     1332  autoBoostCount, boostedCount, markBoosted, unmarkBoosted, getCirkelPosts, getCirkelMembers, selfHealTimeline,
    13581333  getNotifications, listBlocks, isBlockedAny, blockTarget, unblock,
    13591334  deliverWithRetry, enqueueDelivery, processDeliveryQueue, startDeliveryWorker,
Note: See TracChangeset for help on using the changeset viewer.