Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC3395: Synthetic appservice events #3395

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Half-Shot
Copy link
Contributor

@Half-Shot Half-Shot commented Sep 14, 2021

Rendered

Initial implementation for Synapse here
Initial implementation for the matrix-bot-sdk here

@Half-Shot Half-Shot changed the title MSC XXXX: Synthetic appservice events MSC3395: Synthetic appservice events Sep 14, 2021
@Half-Shot Half-Shot force-pushed the hs/synthetic-appservice-events branch from 5753f43 to 5766a53 Compare September 14, 2021 12:33
@Half-Shot Half-Shot force-pushed the hs/synthetic-appservice-events branch from 5766a53 to 03d4482 Compare September 14, 2021 12:33
@@ -0,0 +1,153 @@
# MSC3395: Synthetic Appservice Events
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of the name, happy to for something better. Mainly to distinguish that these aren't "real" events.

Comment on lines 27 to 33
m.synthetic_events:
events:
- "m.user.registration"
- "m.user.login"
- "m.user.logout"
- "m.user.deactivated"
```
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 4 were chosen for their simplicity / needs for my projects, but happy to consider more

@Half-Shot Half-Shot force-pushed the hs/synthetic-appservice-events branch from 938f1e2 to 068d29f Compare September 14, 2021 12:53
@uhoreg uhoreg added application services kind:feature MSC for not-core and not-maintenance stuff proposal A matrix spec change proposal labels Sep 14, 2021
@uhoreg uhoreg added the needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. label Sep 14, 2021
Copy link
Contributor

@ShadowJonathan ShadowJonathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is reasonable and good as-is.

This also potentially opens up the door for tight modded homeserver <-> modded appservice integration via this method with the prospect of homeservers allowing custom synthetic events to be sent over this "channel", which is exciting.

Comment on lines +39 to +40
Currently only the `namespaces.users` field can contain this key, though the door is left open for
future MSCs to expand upon this feature and allow synthetic events for different contexts.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshed: What about introducing a synthetic namespace where these events are listed instead? I assume this'd be helpful if it were introduced for all users, i think an additional "exclude" (by regex) key could be useful in the future then to exclude the likes of bridged users (to reduce noise)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the plan atm is to have the m.synthetic_events key sit under the user namespaces, which organically excludes users we don't care about and only include users we do care about.

If you did want all users, you could do a .*. If you wanted all users except bridges, I'd imagine you'd have a regex that negatively matches the bridge users?

There might be scope for a exclusionary namespace eventually for ease of configuration, but definitely out of scope for this MSC

Co-authored-by: Brendan Abolivier <[email protected]>
- User registration
- User login
- User logout
- User deactivation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that @Yoric had some interest in being able to intercept reports from users into services, so perhaps the ideal flow is that appservices are sent reports via this mechanism.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Media creation / deletion would be a good one too.

@turt2live
Copy link
Member

@Half-Shot what sort of review are you looking for on this? It's made it onto the SCT board, but without context.

@turt2live
Copy link
Member

oob conversation has lead to a realization of not being sure why this is on the board - removing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application services kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants