Changeset e951b7c in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/25/2026 05:22:51 AM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
4c9c60b
Parents:
d7526bd
Message:

feat(fediverse): real bell badge for unseen notifications

Track a per-site 'seen' timestamp (app_settings); the top-bar bell shows a badge
with the count of fediverse notifications newer than last-seen, and opening
/meldingen marks them seen (clears the badge). Replaces the dead user_notifications
counter.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    rd7526bd re951b7c  
    581581  const site = res.locals.site;
    582582  const items = site ? ActivityPubService.getNotifications(site.slug, 80) : [];
     583  if (site) ActivityPubService.markNotificationsSeen(site.slug); // viewing = seen → clears the bell badge
    583584  renderPage(req, res, 'pages/fedi-notifications', { pageTitle: 'Meldingen', bodyClass: 'on-special', items });
    584585});
Note: See TracChangeset for help on using the changeset viewer.