Changeset f5c3870 in Klonkt for src/middleware/render.js


Ignore:
Timestamp:
06/24/2026 04:08:34 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
19a72df
Parents:
d0cab9d
Message:

feat(fediverse-client): block/defederate accounts & domains

Block an @handle or a whole domain (/blokkeren + 🚫 on timeline items): their
inbound activities are silently dropped (202) and their stored content is purged.
New ap_blocks table + isBlockedAny gate in the inbox. Top-bar bell now points to
the fediverse /meldingen (gated to site managers via canManageFedi) instead of the
dead native notifications.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/middleware/render.js

    rd0cab9d rf5c3870  
    100100  const _role = _u ? _u.role : null;
    101101  const canSeeBeheer = !!(_u && (_role === 'god' || _role === 'admin' || _role === 'kijker' || userOwnsSite));
     102  // Who may use the fediverse client (timeline/notifications/blocking) — actual
     103  // site managers only (these routes are requireSiteManager; viewers are excluded).
     104  const canManageFedi = !!(_u && (_role === 'god' || _role === 'admin' || userOwnsSite));
    102105
    103106  // Interface language: session choice (this session) → logged-in user's own preference
     
    118121    userOwnsSite,
    119122    canSeeBeheer,
     123    canManageFedi,
    120124    isViewer: _isViewer,
    121125    canMutate: !_isViewer,
Note: See TracChangeset for help on using the changeset viewer.