Changeset d988fa0 in Klonkt for src/routes


Ignore:
Timestamp:
06/24/2026 03:23:01 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
00f669b
Parents:
914eb9f
Message:

feat(fediverse-client): like/boost/reply on timeline items

Timeline posts get ⭐ like, 🔁 boost (sendInteraction → signed Like/Announce to
the author + followers) and ↩ reply (reuses the remote-interaction popover).

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r914eb9f rd988fa0  
    594594  if (site && actorUri) { try { await ActivityPubService.unfollowActor(site, actorUri); } catch (e) { /* ignore */ } }
    595595  res.redirect('/tijdlijn?success=' + encodeURIComponent('Ontvolgd'));
     596});
     597
     598router.post('/tijdlijn/like', requireSiteManager, async (req, res) => {
     599  const site = res.locals.site;
     600  if (site) { try { await ActivityPubService.sendInteraction(site, 'like', (req.body.note || '').toString(), (req.body.author || '').toString()); } catch (e) { /* ignore */ } }
     601  res.redirect('/tijdlijn?success=' + encodeURIComponent('Geliket ⭐'));
     602});
     603
     604router.post('/tijdlijn/boost', requireSiteManager, async (req, res) => {
     605  const site = res.locals.site;
     606  if (site) { try { await ActivityPubService.sendInteraction(site, 'boost', (req.body.note || '').toString(), (req.body.author || '').toString()); } catch (e) { /* ignore */ } }
     607  res.redirect('/tijdlijn?success=' + encodeURIComponent('Geboost 🔁'));
    596608});
    597609
Note: See TracChangeset for help on using the changeset viewer.