mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Do python right
This commit is contained in:
parent
3c985830f6
commit
a7b38daae5
@ -65,14 +65,14 @@ node lib/index.js
|
||||
|
||||
## Synapse Antispam Module
|
||||
|
||||
Using the bot to manage your rooms is great, however if you want to use your ban lists
|
||||
Using the bot to manage your rooms is great, however if you want to use your ban lists
|
||||
(or someone else's) on your server to affect all of your users then an antispam module
|
||||
is needed. Primarily meant to block invites from undesired homeservers/users, Mjolnir's
|
||||
antispam module is a way to interpret ban lists and apply them to your entire homeserver.
|
||||
|
||||
First, install the module to your Synapse python environment:
|
||||
```
|
||||
pip install -e git+https://github.com/matrix-org/mjolnir.git#egg=mjolnir&subdirectory=synapse_antispam
|
||||
pip install -e "git+https://github.com/matrix-org/mjolnir.git#egg=mjolnir&subdirectory=synapse_antispam"
|
||||
```
|
||||
|
||||
*Note*: Where your python environment is depends on your installation method. Visit
|
||||
|
@ -29,7 +29,7 @@ class BanList(object):
|
||||
self.room_rules = []
|
||||
self.build()
|
||||
|
||||
def build(with_event=None):
|
||||
def build(self, with_event=None):
|
||||
@defer.inlineCallbacks
|
||||
def run(with_event):
|
||||
events = yield self.get_relevant_state_events()
|
||||
|
Loading…
Reference in New Issue
Block a user