diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2023-05-03 12:27:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-03 12:27:33 +0100 |
commit | 04e79e6a185f466c9a2c8d79f6c9de7f42efc6f7 (patch) | |
tree | bab1b9e35eb480c7b33a2f3d886cc42db4c420a4 /synapse/server.py | |
parent | Remove references to supporting per-user flag for msc2654 (#15522) (diff) | |
download | synapse-04e79e6a185f466c9a2c8d79f6c9de7f42efc6f7.tar.xz |
Add config option to forget rooms automatically when users leave them (#15224)
This is largely based off the stats and user directory updater code. Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to '')
-rw-r--r-- | synapse/server.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/synapse/server.py b/synapse/server.py index 75a902d64d..a0036578b1 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -94,7 +94,11 @@ from synapse.handlers.room import ( ) from synapse.handlers.room_batch import RoomBatchHandler from synapse.handlers.room_list import RoomListHandler -from synapse.handlers.room_member import RoomMemberHandler, RoomMemberMasterHandler +from synapse.handlers.room_member import ( + RoomForgetterHandler, + RoomMemberHandler, + RoomMemberMasterHandler, +) from synapse.handlers.room_member_worker import RoomMemberWorkerHandler from synapse.handlers.room_summary import RoomSummaryHandler from synapse.handlers.search import SearchHandler @@ -233,6 +237,7 @@ class HomeServer(metaclass=abc.ABCMeta): "message", "pagination", "profile", + "room_forgetter", "stats", ] @@ -848,6 +853,10 @@ class HomeServer(metaclass=abc.ABCMeta): return PushRulesHandler(self) @cache_in_self + def get_room_forgetter_handler(self) -> RoomForgetterHandler: + return RoomForgetterHandler(self) + + @cache_in_self def get_outbound_redis_connection(self) -> "ConnectionHandler": """ The Redis connection used for replication. |