Changeset ad6f62a in Klonkt for src/routes/posts.js
- Timestamp:
- 07/25/2026 08:09:19 AM (7 weeks ago)
- Branches:
- main
- Children:
- c66cbb4
- Parents:
- e62f65d
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
re62f65d rad6f62a 972 972 res.redirect(back + '?error=guardianship'); 973 973 }); 974 // A ward answers a guardian's wave without publishing: a canned private note 975 // back to the sender (FEP-633c ยง5, shaer:wave reply). Same direct-note leg. 976 router.post('/messages/quick-reply', requireSiteManager, express.urlencoded({ extended: false }), async (req, res) => { 977 const site = res.locals.site; 978 const back = `${res.locals.siteUrlBase || ''}/messages`; 979 const to = String(req.body.to || '').trim(); 980 const text = String(req.body.text || '').trim().slice(0, 200); 981 if (!site || !/^https?:\/\//i.test(to) || !text) return res.redirect(back + '?error=quickreply'); 982 try { 983 const r = await ActivityPubService.deliverDirectNote(site, { recipients: [to], text, wave: true }); 984 if (r) return res.redirect(back + '?success=wave_sent'); 985 } catch { /* fall through */ } 986 res.redirect(back + '?error=quickreply'); 987 }); 988 974 989 router.get('/fediverse', requireSiteManager, (req, res) => res.redirect(`${res.locals.siteUrlBase || ''}/messages`)); 975 990
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)