summary refs log tree commit diff
path: root/synapse/storage/appservice.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-02-05 17:22:16 +0000
committerErik Johnston <erik@matrix.org>2018-02-07 10:32:32 +0000
commit24dd73028ad7fc7a5109a5d97eef5a79179225d4 (patch)
tree67f3f226cf5174a4a7227228acd4ec2ccb05966b /synapse/storage/appservice.py
parentRemove pointless ratelimit check (diff)
downloadsynapse-24dd73028ad7fc7a5109a5d97eef5a79179225d4.tar.xz
Add replication http endpoint for event sending
Diffstat (limited to 'synapse/storage/appservice.py')
-rw-r--r--synapse/storage/appservice.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/storage/appservice.py b/synapse/storage/appservice.py
index d8c84b7141..79673b4273 100644
--- a/synapse/storage/appservice.py
+++ b/synapse/storage/appservice.py
@@ -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.