From 7912551d869c1355dc1f93d130233c927bfb7d91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20B=C3=BCchner?= Date: Sat, 14 Sep 2024 19:17:15 +0200 Subject: [PATCH] update readme --- README.md | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a9a9fce..ca9b2e9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,26 @@ -# Example config for homeserver.yaml -``` -- module: synapse_invite_checker.InviteChecker +# Synapse Invite Checker Module + +This is a Synapse module that checks incoming invites based on whitelist and blacklist rules. The module allows or blocks invites from certain homeservers depending on whether they appear in a dynamically fetched whitelist or blacklist JSON file. + +## Features + +- **Whitelist and Blacklist**: Allows invites from homeservers in the whitelist, blocks invites from homeservers in the blacklist. +- **Dynamic Fetching**: The whitelist and blacklist are fetched dynamically from a provided URL, and cached for 10 minutes. +- **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. Here’s an example configuration: + +```yaml +modules: + - module: synapse_invite_checker.InviteChecker config: - blacklist_whitelist_url: "https://example.com/invites.json" + # URL to fetch the JSON file containing the whitelist and blacklist + blacklist_whitelist_url: "https://example.com/invite-checker-lists.json" + + # Whether to use the whitelist to allow certain homeservers (default: true) use_whitelist: true + + # Whether to use the blacklist to block certain homeservers (default: true) use_blacklist: true -```