Skip to main content

A third-party rules module for Synapse to automatically freeze a room when the last admin leaves it and allow other members to unfreeze them and become the new admin.

Project description

Freeze room

This module uses third-party rules callbacks from Synapse's module interface to identify when the last admin of a room leaves it, and when they do it "freezes" the room.

Freezing the room means adding a custom to the state of the room. If the content of this event says the room is frozen ({"frozen": true}), then the module will prevent any event to be sent in the room. The only exceptions are letting users leave the room, and letting a user unfreeze it and taking over the room's administration.

Unfreezing the room means sending an state event into the room with the content {"frozen": false}. The user unfreezing the room will then automatically become the only administrator in the room.

As with other modules using third-party rules callbacks, it is recommended that this module is only used in a closed federation in which every server has this module configured the same way.

This module requires Synapse v1.39.0 or later.


This plugin can be installed via PyPI:

pip install synapse-freeze-room


Add the following to your Synapse config:

  - module: freeze_room.FreezeRoom
      # Optional: a list of servers that are forbidden from unfreezing rooms.
      # Optional: if set to true, when the last admin in a room leaves it, the module will
      # try to promote any moderator (or user with the highest power level) as admin. In
      # this mode, it will only freeze the room if it can't find any user to promote.
      # Defaults to false.
      promote_moderators: false

Development and Testing

This repository uses tox to run tests.


This repository uses unittest to run the tests located in the tests directory. They can be ran with tox -e tests.

Making a release

git tag vX.Y
python3 sdist
twine upload dist/synapse-freeze-room-X.Y.tar.gz
git push origin vX.Y

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synapse-freeze-room-1.1.0.tar.gz (16.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page