There's 3 methods to block the room:
- Use the synapse admin API for it:
curl -s -X POST -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"new_room_user_id":"@abuse:YOUR_SERVER.org"}' 'https://YOUR_SERVER/_matrix/client/unstable/admin/shutdown_room/!BAD_ROOM:example.org'
- Block the room with an antispam module ( https://github.com/t2bot/synapse-simple-antispam or https://github.com/matrix-org/mjolnir#synapse-antispam-module )
- Ignore the user with
/ignore