Changeset c745659 in Klonkt for src/routes
- Timestamp:
- 06/26/2026 11:25:14 PM (2 months ago)
- Branches:
- main
- Children:
- 3289a64
- Parents:
- eacd3d6
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
reacd3d6 rc745659 1015 1015 const kind = req.body.kind === 'boost' ? 'boost' : 'like'; 1016 1016 if (parent && parent.post_id === post.id && parent.object_uri) { 1017 ActivityPubService.sendInteraction(site, kind, parent.object_uri, parent.actor_uri) 1018 .catch((e) => console.warn('[AP] reaction failed:', e.message)); 1017 if (kind === 'boost') { 1018 // Toggle: boost an unboosted comment, or retract it (Undo Announce) if already boosted. 1019 const on = !parent.acted_boost; 1020 ActivityPubService.sendInteraction(site, on ? 'boost' : 'unboost', parent.object_uri, parent.actor_uri) 1021 .catch((e) => console.warn('[AP] reaction failed:', e.message)); 1022 ActivityPubService.setInteractionBoosted(parent.id, on); 1023 } else { 1024 ActivityPubService.sendInteraction(site, 'like', parent.object_uri, parent.actor_uri) 1025 .catch((e) => console.warn('[AP] reaction failed:', e.message)); 1026 } 1019 1027 } 1020 1028 res.redirect(`${res.locals.siteUrlBase || ''}/${post.slug}#fediverse`);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)