Open cristi-vlad opened 11 months ago
The relevant source is:
On the face of it, I'm not sure if this module callback is the right approach. You could try user_may_invite
instead. One note of caution: I'm not sure if that is designed to handle requests created by the local server, versus those it receives. (Maybe it handles both?)
Another option would be try using the admin API to entirely block the unwanted rooms.
Description
I am trying to create a module that blocks federation of rooms between two matrix servers. Logics is based on m.room.member event type and determines source server and destination server. If source server is different than destination server and room id is not in allowed rooms, then return forbidden.
Rooms are provided as config in values file:
Python module
Logs from execution
Last line is very important: "Event contains spam, soft-failing $rQtlVB1HGJsli1eRemKWawHYO4hL0L9RGCA5zPbXISE" It says that the event contains spam and soft failing but still invite can be sent to the other user and the other use may accept the invite then talk.
Steps to reproduce
Homeserver
local homeserver
Synapse Version
{"server":{"name":"Synapse","version":"1.92.3"}}
Installation Method
Docker (matrixdotorg/synapse)
Database
Postgresql
Workers
Single process
Platform
Rancher - Kubernetes
Configuration
Relevant log output
Anything else that would be useful to know?
No response