summary refs log tree commit diff
path: root/synapse/storage/appservice.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-05-17 16:28:50 +0100
committerGitHub <noreply@github.com>2017-05-17 16:28:50 +0100
commitace23463c51753cb3eff97d96d020d8fe436cb11 (patch)
treef9a16525aef27683f6808aea5e5213789280d998 /synapse/storage/appservice.py
parentMerge branch 'release-v0.21.0' of github.com:matrix-org/synapse into develop (diff)
parentFix users claimed non-exclusively by an app service don't get notifications #... (diff)
downloadsynapse-ace23463c51753cb3eff97d96d020d8fe436cb11.tar.xz
Merge pull request #2216 from slipeer/app_services_interested_in_user
Fix users claimed non-exclusively by an app service don't get notific…
Diffstat (limited to 'synapse/storage/appservice.py')
-rw-r--r--synapse/storage/appservice.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/storage/appservice.py b/synapse/storage/appservice.py
index 514570561f..0e9e8d3452 100644
--- a/synapse/storage/appservice.py
+++ b/synapse/storage/appservice.py
@@ -39,12 +39,15 @@ class ApplicationServiceStore(SQLBaseStore):
     def get_app_services(self):
         return self.services_cache
 
-    def get_if_app_services_interested_in_user(self, user_id):
+    def get_if_app_services_interested_in_user(self, user_id, exclusive=False):
         """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
+                if exclusive:
+                    return service.is_exclusive_user(user_id)
+                else:
+                    return True
         return False
 
     def get_app_service_by_user_id(self, user_id):