Changeset f1a23b8 in Klonkt for src/routes/posts.js
- Timestamp:
- 07/18/2026 12:53:15 AM (8 weeks ago)
- Branches:
- main
- Children:
- 05cd954
- Parents:
- 7d19465
- git-author:
- Robin <roboburr@…> (07/18/2026 12:52:51 AM)
- git-committer:
- Robin <roboburr@…> (07/18/2026 12:53:15 AM)
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
r7d19465 rf1a23b8 722 722 723 723 // Manage / delete your own outbound fediverse replies (site owner only). 724 router.get('/fediverse', requireSiteManager, (req, res) => { 725 const site = res.locals.site; 726 const items = site ? ActivityPubService.listOutbox(site.slug) : []; 727 renderPage(req, res, 'pages/authorize-interaction', { 728 pageTitleKey: 'fedi.manage_title', bodyClass: 'on-special', // i18n: was hardcoded Dutch 729 manage: items, uri: '', target: null, sent: false, siteTitle: site ? site.title : '', 724 // Messages = Reacties + Meldingen in ONE inbox (your sent replies join the stream). 725 // The old /fediverse (manage) and /notifications pages redirect here. 726 router.get('/messages', requireSiteManager, (req, res) => { 727 const site = res.locals.site; 728 const items = site ? ActivityPubService.getMessages(site.slug, 80) : []; 729 // Read the watermark BEFORE marking seen → unread dots on items newer than last visit. 730 const seenAt = site ? ActivityPubService.notificationsSeenAt(site.slug) : 0; 731 if (site && !isViewer(req.session.user)) ActivityPubService.markNotificationsSeen(site.slug); 732 renderPage(req, res, 'pages/messages', { 733 pageTitleKey: 'msg.title', bodyClass: 'on-special', items, seenAt, 734 success: req.query.success || null, error: req.query.error || null, 730 735 }); 731 736 }); 737 router.get('/fediverse', requireSiteManager, (req, res) => res.redirect(`${res.locals.siteUrlBase || ''}/messages`)); 732 738 733 739 router.post('/fediverse/:id/delete', requireSiteManager, async (req, res) => { … … 963 969 964 970 // Notifications inbox (new followers + replies/likes/boosts on your posts). 965 router.get('/notifications', requireSiteManager, (req, res) => { 966 const site = res.locals.site; 967 const items = site ? ActivityPubService.getNotifications(site.slug, 80) : []; 968 // viewing = seen → clears the bell badge. A viewer (kijker) may look but must not 969 // mutate state (the global write-guard only catches non-GET, not this GET-side effect). 970 if (site && !isViewer(req.session.user)) ActivityPubService.markNotificationsSeen(site.slug); 971 renderPage(req, res, 'pages/fedi-notifications', { pageTitle: 'Meldingen', bodyClass: 'on-special', items }); 972 }); 971 router.get('/notifications', requireSiteManager, (req, res) => res.redirect(`${res.locals.siteUrlBase || ''}/messages`)); 973 972 974 973 // Blocking / defederation (owner-only).
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)