Changeset 5045c30 in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/26/2026 12:00:18 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
3384e95
Parents:
484adf8
Message:

feat(cirkel): boosted posts also appear in the Cirkel (mixed by date, deduped)

Option B: when you boost (🔁) a timeline post it's marked ap_timeline.boosted and
shows in the Cirkel alongside the featured accounts' posts, sorted by date. One row
per note → a post that's both featured and boosted appears once (no double). The
Cirkel/tab now also shows when you only have boosted posts (no featured accounts).
No fediverse traffic — the boost itself is the existing user action; this only marks
it locally.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r484adf8 r5045c30  
    627627router.post('/tijdlijn/boost', requireSiteManager, async (req, res) => {
    628628  const site = res.locals.site;
    629   if (site) { try { await ActivityPubService.sendInteraction(site, 'boost', (req.body.note || '').toString(), (req.body.author || '').toString()); } catch (e) { /* ignore */ } }
     629  const note = (req.body.note || '').toString();
     630  if (site && note) {
     631    try { await ActivityPubService.sendInteraction(site, 'boost', note, (req.body.author || '').toString()); } catch (e) { /* ignore */ }
     632    ActivityPubService.markBoosted(site.slug, note); // also surface it in the Cirkel (mixed by date)
     633  }
    630634  res.redirect('/tijdlijn?success=' + encodeURIComponent('Geboost 🔁'));
    631635});
Note: See TracChangeset for help on using the changeset viewer.