No description
Find a file
2024-09-14 20:37:38 +02:00
synapse_invite_checker remove dependecies 2024-09-14 20:37:38 +02:00
.gitignore initial 2024-09-14 19:12:42 +02:00
pyproject.toml remove dependecies 2024-09-14 20:37:38 +02:00
README.md small fixes 2024-09-14 20:17:43 +02:00

Synapse Invite Checker Module

This is a Synapse module that checks incoming invites based on allowlist and blocklist rules. The module allows or blocks invites from certain homeservers depending on whether they appear in a dynamically fetched allowlist or blocklist JSON file.

Features

  • allowlist and blocklist: Allows invites from homeservers in the allowlist, blocks invites from homeservers in the blocklist.
  • Dynamic Fetching: The allowlist and blocklist are fetched dynamically from a provided URL, and cached.
  • Fallback on Failure: If the JSON file cannot be fetched (e.g., network error), the module automatically allows all invites to prevent disruptions.

Configuration

Add this module to your Synapse's homeserver.yaml under the modules section. Heres an example configuration:

modules:
  - module: synapse_invite_checker.InviteChecker
    config:
      # URL to fetch the JSON file containing the allowlist and blocklist
      blocklist_allowlist_url: "https://example.com/invite-checker-lists.json"
      # Whether to use the allowlist to allow certain homeservers (default: true)
      use_allowlist: true
      # Whether to use the blocklist to block certain homeservers (default: true)
      use_blocklist: true