summary refs log tree commit diff
path: root/synapse/appservice
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2023-05-23 10:35:43 -0400
committerGitHub <noreply@github.com>2023-05-23 10:35:43 -0400
commit7c9b91790c013d11ca88a9d01e0054939eda8523 (patch)
tree4682d94994f22cbb9f030a646e6c530f6cc1d593 /synapse/appservice
parentUse a custom scheme & the worker name for replication requests. (#15578) (diff)
downloadsynapse-7c9b91790c013d11ca88a9d01e0054939eda8523.tar.xz
Consolidate logic to check for deactivated users. (#15634)
This moves the deactivated user check to the method which
all login types call.

Additionally updates the application service tests to be more
realistic by removing invalid tests and fixing server names.
Diffstat (limited to 'synapse/appservice')
-rw-r--r--synapse/appservice/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py
index 35c330a3c4..2260a8f589 100644
--- a/synapse/appservice/__init__.py
+++ b/synapse/appservice/__init__.py
@@ -86,6 +86,7 @@ class ApplicationService:
             url.rstrip("/") if isinstance(url, str) else None
         )  # url must not end with a slash
         self.hs_token = hs_token
+        # The full Matrix ID for this application service's sender.
         self.sender = sender
         self.namespaces = self._check_namespaces(namespaces)
         self.id = id
@@ -212,7 +213,7 @@ class ApplicationService:
             True if the application service is interested in the user, False if not.
         """
         return (
-            # User is the appservice's sender_localpart user
+            # User is the appservice's configured sender_localpart user
             user_id == self.sender
             # User is in the appservice's user namespace
             or self.is_user_in_namespace(user_id)