From 6249e2e8b5c56f63fbca396c84fde03dbdb22b0c Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Thu, 16 Sep 2021 10:58:56 +0100 Subject: [PATCH] Also allow to opt-out of normal events --- proposals/3395-synthetic-appservice-events.md | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/proposals/3395-synthetic-appservice-events.md b/proposals/3395-synthetic-appservice-events.md index 7f1dffce9..6b2dcf107 100644 --- a/proposals/3395-synthetic-appservice-events.md +++ b/proposals/3395-synthetic-appservice-events.md @@ -23,12 +23,17 @@ An appservice must subscribe to the changes that it wishes to listen for. This c key in the appservice registration file: `m.synthetic_events`, under the `namespaces` key: ```yaml -m.synthetic_events: - events: - - "m.user.registration" - - "m.user.login" - - "m.user.logout" - - "m.user.deactivated" +namespaces: + users: + - exclusive: false # This needs to be false to allow for registrations + regex: "@.*:mydomain" + m.events: false # Allow or disallow normal events to be sent from this namespace. + m.synthetic_events: + events: + - "m.user.registration" + - "m.user.login" + - "m.user.logout" + - "m.user.deactivated" ``` Currently only the `namespaces.users` field can contain this key, though the door is left open for @@ -40,6 +45,9 @@ the appservice comes back up. As the synthetic events are namespaced, the AS should only be sent events for users in that namespace. +Because a namespace is listed for these users, the AS will also recieve room events for these users by default. To opt-out +of sending room events to the AS (and allow only synthetic events to be sent), the key `m.events` can be set to `false`. + ``` PUT /_matrix/app/v1/transactions/{txnId} ```