Refactor MSC2716 /batch_send endpoint into separate handler functions (#10974)

This commit is contained in:
Eric Eastwood 2021-10-08 18:35:00 -05:00 committed by GitHub
parent 1b112840d2
commit a7d22c36db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 494 additions and 292 deletions

View file

@ -97,6 +97,7 @@ from synapse.handlers.room import (
RoomCreationHandler,
RoomShutdownHandler,
)
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_worker import RoomMemberWorkerHandler
@ -437,6 +438,10 @@ class HomeServer(metaclass=abc.ABCMeta):
def get_room_creation_handler(self) -> RoomCreationHandler:
return RoomCreationHandler(self)
@cache_in_self
def get_room_batch_handler(self) -> RoomBatchHandler:
return RoomBatchHandler(self)
@cache_in_self
def get_room_shutdown_handler(self) -> RoomShutdownHandler:
return RoomShutdownHandler(self)