summary refs log tree commit diff
path: root/synapse/storage/appservice.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-11-23 15:21:52 +0000
committerGitHub <noreply@github.com>2016-11-23 15:21:52 +0000
commitb2d6e63b79e4eee8ea8e9439b12786e010acc3b7 (patch)
treef41b5b12bd9db514061720dbf36bfd33b02ced3e /synapse/storage/appservice.py
parentMerge pull request #1640 from matrix-org/kegan/sync-perf (diff)
parentIgnore AS users when fetching push rules (diff)
downloadsynapse-b2d6e63b79e4eee8ea8e9439b12786e010acc3b7.tar.xz
Merge pull request #1641 from matrix-org/erikj/as_pushers
Ignore AS users when fetching push rules
Diffstat (limited to 'synapse/storage/appservice.py')
-rw-r--r--synapse/storage/appservice.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/storage/appservice.py b/synapse/storage/appservice.py
index 3d5994a580..514570561f 100644
--- a/synapse/storage/appservice.py
+++ b/synapse/storage/appservice.py
@@ -39,6 +39,14 @@ class ApplicationServiceStore(SQLBaseStore):
     def get_app_services(self):
         return self.services_cache
 
+    def get_if_app_services_interested_in_user(self, user_id):
+        """Check if the user is one associated with an app service
+        """
+        for service in self.services_cache:
+            if service.is_interested_in_user(user_id):
+                return True
+        return False
+
     def get_app_service_by_user_id(self, user_id):
         """Retrieve an application service from their user ID.