Changeset 8878814 in Klonkt for src/routes


Ignore:
Timestamp:
07/16/2026 12:20:51 PM (8 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
2d6a9c3
Parents:
72f936a
git-author:
Robin <roboburr@…> (07/12/2026 11:43:58 PM)
git-committer:
Robin <roboburr@…> (07/16/2026 12:20:51 PM)
Message:

Feature: followers list with delivery health for cleanup

Adds a /followers page (new Fediverse tab) listing remote accounts that
follow you, each with its last SUCCESSFUL delivery timestamp so dead accounts
surface for manual pruning. New ap_followers columns last_delivery_at /
last_error_at (additive migration) are stamped in deliverWithRetry and the
retry-queue worker on success / final give-up. Never-delivered and failing
accounts sort to the top and are highlighted; a Remove button drops the local
follower row after a manual check. i18n added for NL/EN/DE.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r72f936a r8878814  
    811811    success: req.query.success || null, error: req.query.error || null,
    812812  });
     813});
     814
     815// Followers (remote AP actors following us) + per-account delivery health, so dead
     816// accounts (never/last-delivered long ago) can be pruned after a manual check.
     817router.get('/followers', requireSiteManager, (req, res) => {
     818  const site = res.locals.site;
     819  const followers = site ? ActivityPubService.listFollowers(site.slug) : [];
     820  renderPage(req, res, 'pages/followers', {
     821    pageTitle: 'Volgers', bodyClass: 'on-special',
     822    followers,
     823    success: req.query.success || null, error: req.query.error || null,
     824  });
     825});
     826
     827router.post('/followers/:id/remove', requireSiteManager, (req, res) => {
     828  const site = res.locals.site;
     829  const base = res.locals.siteUrlBase || '';
     830  if (!site) return res.redirect(`${base}/followers`);
     831  const ok = ActivityPubService.removeFollower(site.slug, parseInt(req.params.id, 10) || 0);
     832  return res.redirect(`${base}/followers?` + (ok
     833    ? 'success=' + encodeURIComponent('Volger verwijderd')
     834    : 'error=' + encodeURIComponent('Volger niet gevonden')));
    813835});
    814836
Note: See TracChangeset for help on using the changeset viewer.