Changeset c7ecaf9 in Klonkt for src/routes
- Timestamp:
- 06/26/2026 11:45:53 PM (2 months ago)
- Branches:
- main
- Children:
- 9d34855
- Parents:
- 2f42b60
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
r2f42b60 rc7ecaf9 511 511 const site = res.locals.site; 512 512 const uri = (req.body.uri || '').toString(); 513 let on = false; 513 514 if (site && uri) { 514 conston = !ActivityPubService.getMyReactions(site.slug, uri).liked;515 on = !ActivityPubService.getMyReactions(site.slug, uri).liked; 515 516 ActivityPubService.resolveRemoteNote(uri) 516 517 .then((note) => note && ActivityPubService.sendInteraction(site, on ? 'like' : 'unlike', note.object_uri || uri, note.actor_uri)) … … 518 519 ActivityPubService.setMyReaction(site.slug, uri, 'like', on); 519 520 } 521 if (req.get('X-Requested-With') === 'fetch') return res.json({ ok: true, on }); 520 522 res.redirect('/authorize_interaction?uri=' + encodeURIComponent(uri)); 521 523 }); … … 526 528 const site = res.locals.site; 527 529 const uri = (req.body.uri || '').toString(); 530 let on = false; 528 531 if (site && uri) { 529 conston = !ActivityPubService.getMyReactions(site.slug, uri).boosted;532 on = !ActivityPubService.getMyReactions(site.slug, uri).boosted; 530 533 ActivityPubService.resolveRemoteNote(uri) 531 534 .then((note) => { … … 538 541 ActivityPubService.setMyReaction(site.slug, uri, 'boost', on); 539 542 } 543 if (req.get('X-Requested-With') === 'fetch') return res.json({ ok: true, on }); 540 544 res.redirect('/authorize_interaction?uri=' + encodeURIComponent(uri)); 541 545 });
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)