mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Fix users claimed non-exclusively by an app service don't get notifications #2211
This commit is contained in:
parent
c1935f0a41
commit
328378f9cb
@ -39,11 +39,14 @@ class ApplicationServiceStore(SQLBaseStore):
|
|||||||
def get_app_services(self):
|
def get_app_services(self):
|
||||||
return self.services_cache
|
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
|
"""Check if the user is one associated with an app service
|
||||||
"""
|
"""
|
||||||
for service in self.services_cache:
|
for service in self.services_cache:
|
||||||
if service.is_interested_in_user(user_id):
|
if service.is_interested_in_user(user_id):
|
||||||
|
if exclusive:
|
||||||
|
return service.is_exclusive_user(user_id)
|
||||||
|
else:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ class PushRuleStore(SQLBaseStore):
|
|||||||
local_users_in_room = set(
|
local_users_in_room = set(
|
||||||
u for u in users_in_room
|
u for u in users_in_room
|
||||||
if self.hs.is_mine_id(u)
|
if self.hs.is_mine_id(u)
|
||||||
and not self.get_if_app_services_interested_in_user(u)
|
and not self.get_if_app_services_interested_in_user(u, exclusive=True)
|
||||||
)
|
)
|
||||||
|
|
||||||
# users in the room who have pushers need to get push rules run because
|
# users in the room who have pushers need to get push rules run because
|
||||||
|
Loading…
Reference in New Issue
Block a user