diff options
author | Erik Johnston <erikj@jki.re> | 2017-05-18 16:51:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-18 16:51:18 +0100 |
commit | 234772db6dc99665803b29e199498292c37a6c03 (patch) | |
tree | 0905b0c2d5eaf87c06b84fbe9a31385ab545b88a /synapse/appservice/__init__.py | |
parent | Remove size of push get_rules cache (diff) | |
parent | Make get_if_app_services_interested_in_user faster (diff) | |
download | synapse-234772db6dc99665803b29e199498292c37a6c03.tar.xz |
Merge pull request #2233 from matrix-org/erikj/faster_as_check
Make get_if_app_services_interested_in_user faster
Diffstat (limited to 'synapse/appservice/__init__.py')
-rw-r--r-- | synapse/appservice/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py index 7346206bb1..b989007314 100644 --- a/synapse/appservice/__init__.py +++ b/synapse/appservice/__init__.py @@ -241,6 +241,16 @@ class ApplicationService(object): def is_exclusive_room(self, room_id): return self._is_exclusive(ApplicationService.NS_ROOMS, room_id) + def get_exlusive_user_regexes(self): + """Get the list of regexes used to determine if a user is exclusively + registered by the AS + """ + return [ + regex_obj["regex"] + for regex_obj in self.namespaces[ApplicationService.NS_USERS] + if regex_obj["exclusive"] + ] + def is_rate_limited(self): return self.rate_limited |