Changeset 1c2dcba in Klonkt for src/routes
- Timestamp:
- 07/01/2026 07:14:12 PM (2 months ago)
- Branches:
- main
- Children:
- 737ea05
- Parents:
- 0688b5f
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
r0688b5f r1c2dcba 585 585 const followed = !!req.query.followed; 586 586 const voted = !!req.query.voted; 587 const reported = !!req.query.reported; 587 588 let target = null, followTarget = null; 588 if (!sent && !followed && !voted && uri) {589 if (!sent && !followed && !voted && !reported && uri) { 589 590 try { target = await ActivityPubService.resolveRemoteNote(uri); } catch { /* ignore */ } 590 591 // Not a post? Maybe the URI is a profile/actor → offer Follow, not reply. … … 600 601 followed, 601 602 voted: !!req.query.voted, 603 reported: !!req.query.reported, 602 604 liked: !!req.query.liked, 603 605 boosted: !!req.query.boosted, … … 617 619 if (site && uri && choice.length) { try { await ActivityPubService.voteOnRemotePoll(site, uri, choice.map(String)); } catch { /* ignore */ } } 618 620 res.redirect('/authorize_interaction?voted=1&uri=' + encodeURIComponent(uri)); 621 }); 622 623 // 🚩 Report a remote post/account to its home instance (sends an AS2 Flag). 624 router.post('/authorize_interaction/report', requireSiteManager, async (req, res) => { 625 const site = res.locals.site; 626 const uri = (req.body.uri || '').toString(); 627 const actorUri = (req.body.actor_uri || '').toString(); 628 const reason = (req.body.reason || '').toString(); 629 if (site && (uri || actorUri)) { try { await ActivityPubService.sendReport(site, { objectUri: uri, actorUri, reason }); } catch { /* ignore */ } } 630 res.redirect('/authorize_interaction?reported=1&uri=' + encodeURIComponent(uri || actorUri)); 619 631 }); 620 632
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)