Changeset 484adf8 in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/26/2026 11:16:45 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
5045c30
Parents:
5783c67
Message:

feat(cirkel): featuring is local-only; optional one-time 'boost latest 5'

Per Robin+Bart: featuring an artist = show their posts in your Cirkel (local) — it
no longer auto-Announces every incoming post to the fediverse (that flooded
followers, esp. on the follow backfill). Boosting to the fediverse is now a
deliberate, opt-in 'boost the latest 5' checkbox at follow time (off by default,
one-time). boostLatestN() reads the actor outbox and boosts the 5 newest. Labels
reworked (auto-boost -> Uitgelicht / feature in circle). nl/en/de.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r5783c67 r484adf8  
    590590      const r = await ActivityPubService.followActor(site, handle, !!req.body.auto_boost);
    591591      if (r && r.error) q = 'error=' + encodeURIComponent(r.error === 'not_found' ? 'Account niet gevonden' : (r.error === 'unreachable' ? 'Server onbereikbaar' : 'Volgen mislukt'));
    592       else q = 'success=' + encodeURIComponent('Je volgt nu ' + ((r && r.name) || handle));
     592      else {
     593        let msg = 'Je volgt nu ' + ((r && r.name) || handle);
     594        // Optional, one-time: boost their latest 5 posts to the fediverse.
     595        if (req.body.boost5 && r && r.actor) {
     596          const b = await ActivityPubService.boostLatestN(site, r.actor, 5).catch(() => null);
     597          if (b && b.boosted) msg += ' — ' + b.boosted + ' post(s) geboost';
     598        }
     599        q = 'success=' + encodeURIComponent(msg);
     600      }
    593601    } catch (e) { q = 'error=' + encodeURIComponent('Volgen mislukt'); }
    594602  }
Note: See TracChangeset for help on using the changeset viewer.