Merge pull request #2854 from matrix-org/erikj/event_create_worker

Create a worker for event creation
This commit is contained in:
Erik Johnston 2018-02-13 18:07:10 +00:00 committed by GitHub
commit c0c9327fe0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 533 additions and 24 deletions

View file

@ -99,6 +99,19 @@ class ApplicationServiceStore(SQLBaseStore):
return service
return None
def get_app_service_by_id(self, as_id):
"""Get the application service with the given appservice ID.
Args:
as_id (str): The application service ID.
Returns:
synapse.appservice.ApplicationService or None.
"""
for service in self.services_cache:
if service.id == as_id:
return service
return None
def get_app_service_rooms(self, service):
"""Get a list of RoomsForUser for this application service.