Changeset 74d61e6 in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/27/2026 07:15:25 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
f99c830
Parents:
dcff893
Message:

feat(fedi): boosting a non-followed post shows it in the Cirkel

The interact-page boost now stores the remote post in ap_timeline (INSERT OR IGNORE, no
dup for followed posts) before flagging it boosted, so a boost of someone you don't
follow still surfaces in the Cirkel with a Boost badge. upsertBoostedNote(slug, note).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    rdcff893 r74d61e6  
    537537        const id = note.object_uri || uri;
    538538        return Promise.resolve(ActivityPubService.sendInteraction(site, on ? 'boost' : 'unboost', id, note.actor_uri))
    539           .then(() => on ? ActivityPubService.markBoosted(site.slug, id) : ActivityPubService.unmarkBoosted(site.slug, id));
     539          // Boost → store the post in the timeline (even if you don't follow the author) so it
     540          // surfaces in the Cirkel; unboost → just clear the flag.
     541          .then(() => on ? ActivityPubService.upsertBoostedNote(site.slug, note) : ActivityPubService.unmarkBoosted(site.slug, id));
    540542      })
    541543      .catch((e) => console.warn('[AP] remote boost failed:', e.message));
Note: See TracChangeset for help on using the changeset viewer.