Changeset 283f618 in Klonkt for src/routes/admin-settings.js


Ignore:
Timestamp:
06/26/2026 07:26:26 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
f278df9
Parents:
eb2fe08
Message:

feat(fediverse): add an ActivityPub on/off toggle (off = no federation, no comments)

A solo site can now run without the fediverse. ap_enabled (default on, Beheer ->
Instellingen). When off: /ap/*, WebFinger and NodeInfo 404 (undiscoverable), the
'from the fediverse' reactions section is hidden on posts (= no comments, since
native comments were removed), the profile follow button and the fediverse admin
links disappear. Cirkels is separate (not gated here).

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/admin-settings.js

    reb2fe08 r283f618  
    8282    smtp: mailerStatus(),
    8383    footerNewsletter: getSetting('footer_newsletter') === '1',
     84    apEnabledSetting: getSetting('ap_enabled', '1') !== '0',
    8485    success: req.query.success || null,
    8586    error: req.query.error || null,
     
    166167});
    167168
     169// Fediverse (ActivityPub) on/off. Off = no federation + no fediverse reactions.
     170router.post('/ap', requireGod, (req, res) => {
     171  setSetting('ap_enabled', req.body.ap_enabled ? '1' : '0');
     172  res.redirect('/admin/settings?success=' + encodeURIComponent('Fediverse-instelling opgeslagen'));
     173});
     174
    168175// Send a test email to a specified address (or the logged-in user).
    169176router.post('/smtp/test', requireGod, async (req, res) => {
Note: See TracChangeset for help on using the changeset viewer.