From d0442ec97b89a49ecc808a6cc48a018775e6cc98 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 25 Oct 2022 21:48:54 +0100 Subject: [PATCH] Clarify that appservices can only watch local users Spec for MSC3905 --- content/application-service-api.md | 10 ++++++++++ .../application-service/definitions/registration.yaml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/content/application-service-api.md b/content/application-service-api.md index 18ec7867..d9dbac5c 100644 --- a/content/application-service-api.md +++ b/content/application-service-api.md @@ -80,6 +80,16 @@ namespaces: rooms: [] ``` +{{% boxes/note %}} +Application services can only register interest in *local* users (i.e., users +whose IDs end with the `server_name` of the local homeserver). Events affecting +users on other homeservers are not sent to an application service, even if the +user happens to match the one of the `users` namespaces (unless, of course, the +event affects a room that the application service is interested in for another +room - for example, because there is another user in the room that the +application service is interested in). +{{% /boxes/note %}} + {{% boxes/warning %}} If the homeserver in question has multiple application services, each `as_token` and `id` MUST be unique per application service as these are diff --git a/data/api/application-service/definitions/registration.yaml b/data/api/application-service/definitions/registration.yaml index 50eefdfb..5fab75d0 100644 --- a/data/api/application-service/definitions/registration.yaml +++ b/data/api/application-service/definitions/registration.yaml @@ -41,7 +41,7 @@ properties: - description: |- A list of namespaces defining the user IDs that the application service is interested in. Events will be sent to the AS if a - user matching one of the namespaces is the target of the event, + local user matching one of the namespaces is the target of the event, or is a joined member of the room where the event occurred. rooms: allOf: