From a959df71c129fe5a9fb6fee9de10659512fa872d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 1 Nov 2022 14:25:53 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Eric Eastwood --- content/application-service-api.md | 14 ++++++++------ .../definitions/registration.yaml | 8 ++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/content/application-service-api.md b/content/application-service-api.md index d9dbac5c..64cf7597 100644 --- a/content/application-service-api.md +++ b/content/application-service-api.md @@ -81,13 +81,15 @@ namespaces: ``` {{% 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 +For the `users` namespace, 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). + +For the `rooms` and `aliases` namespaces, all events in a matching room will be sent to the application service. {{% /boxes/note %}} {{% boxes/warning %}} diff --git a/data/api/application-service/definitions/registration.yaml b/data/api/application-service/definitions/registration.yaml index 5fab75d0..d9dfe748 100644 --- a/data/api/application-service/definitions/registration.yaml +++ b/data/api/application-service/definitions/registration.yaml @@ -48,15 +48,15 @@ properties: - $ref: namespace_list.yaml - description: |- A list of namespaces defining the room IDs that the application - service is interested in. Events will be sent to the AS if they - take place in a room with an ID matching one of the namespaces. + service is interested in. All events sent in a room with an ID + which matches one of the namespaces will be sent to the AS. aliases: allOf: - $ref: namespace_list.yaml - description: |- A list of namespaces defining the room aliases that the application - service is interested in. Events will be sent to the AS if they - take place in a room with an alias matching one of the namespaces. + service is interested in. All events sent in a room with an alias + which matches one of the namespaces will be sent to the AS. rate_limited: type: boolean description: Whether requests from masqueraded users are rate-limited. The sender is excluded.