mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:44:49 -04:00
Ignore AS users when fetching push rules
By ignoring AS users early on when fetching push rules for a room we can avoid needlessly hitting the DB and filling up the caches.
This commit is contained in:
parent
baf9e74a73
commit
0163466d72
2 changed files with 18 additions and 2 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue