Changeset f5c3870 in Klonkt for src/config/database.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/config/database.js

    rd0cab9d rf5c3870  
    379379    );
    380380    CREATE INDEX IF NOT EXISTS idx_ap_timeline_slug ON ap_timeline(slug, published);
     381    CREATE TABLE IF NOT EXISTS ap_blocks (
     382      id INTEGER PRIMARY KEY AUTOINCREMENT,
     383      slug TEXT NOT NULL,          -- our site that set the block
     384      target TEXT NOT NULL,        -- actor URI (actor block) or domain (domain block)
     385      kind TEXT NOT NULL,          -- 'actor' | 'domain'
     386      label TEXT,                  -- display (@handle or domain)
     387      created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
     388      UNIQUE(slug, target)
     389    );
     390    CREATE INDEX IF NOT EXISTS idx_ap_blocks_target ON ap_blocks(target);
    381391  `);
    382392}
Note: See TracChangeset for help on using the changeset viewer.