Changeset b6cdc3d in Klonkt for src/routes
- Timestamp:
- 06/26/2026 01:13:21 PM (2 months ago)
- Branches:
- main
- Children:
- 54d2f98
- Parents:
- c7c7f02
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
rc7c7f02 rb6cdc3d 501 501 followed, 502 502 liked: !!req.query.liked, 503 boosted: !!req.query.boosted, 503 504 siteTitle: site ? site.title : '', 504 505 }); … … 515 516 } 516 517 res.redirect('/authorize_interaction?liked=1&uri=' + encodeURIComponent(uri)); 518 }); 519 520 // 🔁 Boost a remote post from your own site. Also flags it for the Cirkel 521 // (markBoosted is a no-op if the post isn't in your timeline). 522 router.post('/authorize_interaction/boost', requireSiteManager, (req, res) => { 523 const site = res.locals.site; 524 const uri = (req.body.uri || '').toString(); 525 if (site && uri) { 526 ActivityPubService.resolveRemoteNote(uri) 527 .then((note) => { 528 if (!note) return; 529 const id = note.object_uri || uri; 530 return Promise.resolve(ActivityPubService.sendInteraction(site, 'boost', id, note.actor_uri)) 531 .then(() => ActivityPubService.markBoosted(site.slug, id)); 532 }) 533 .catch((e) => console.warn('[AP] remote boost failed:', e.message)); 534 } 535 res.redirect('/authorize_interaction?boosted=1&uri=' + encodeURIComponent(uri)); 517 536 }); 518 537
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)