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

MSC2929: Interaction events #2929

Closed
wants to merge 4 commits into from
Closed

MSC2929: Interaction events #2929

wants to merge 4 commits into from

Conversation

erkinalp
Copy link

@erkinalp erkinalp commented Dec 29, 2020

Extremely simplistic and primitive design of interaction events.
Rendered

@uhoreg uhoreg added kind:feature MSC for not-core and not-maintenance stuff proposal A matrix spec change proposal labels Dec 29, 2020
@uhoreg uhoreg changed the title MSC 2899: Interaction events MSC 2929: Interaction events Dec 29, 2020
@turt2live turt2live changed the title MSC 2929: Interaction events MSC2929: Interaction events Dec 29, 2020
@turt2live
Copy link
Member

@erkinalp the MSC number is actually 2929 (please rename the file). We also need signoff before we can consider this MSC in a landable state, though it can enter review for now.

Signed-off-by: Erkin Alp Güney <erkinalp9035@gmail.com>
Copy link
Contributor

@erdnaxeli erdnaxeli left a comment

Choose a reason for hiding this comment

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

I found this MSC confusing, I don't really understand what it wants to solve. It looks likes it targets bots, but I don't think there is any needs for new event just to send commands to bots.

I think you should add some detailed use cases.

Interactions should be responded by `target` users if and only if they understand the interaction
body.

Presentation of interactions to users are left implementation defined.
Copy link
Contributor

@erdnaxeli erdnaxeli Dec 29, 2020

Choose a reason for hiding this comment

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

I think the presentation should be specified, so every client implements it in a common way. The users should be able to change their matrix client without having to learn new patterns.

Copy link
Author

Choose a reason for hiding this comment

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

How could I stipulate a common presentation when interaction types are implementation defined?

Copy link
Author

Choose a reason for hiding this comment

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

I have now added recommended response targets for interaction responses, which will enable clients to make reasonable presentation decisions. However, as interaction subtypes are left implementation defined, I cannot exhaustively define presentation behaviour for all possible types of interaction events.

Copy link
Contributor

@erdnaxeli erdnaxeli Dec 30, 2020

Choose a reason for hiding this comment

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

I was thinking about how available interactions are presented to the user so it can use them, not about what they trigger.

Interactions should be responded by `target` users if and only if they understand the interaction
body.

Presentation of interactions to users are left implementation defined.
Copy link
Contributor

Choose a reason for hiding this comment

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

How do the clients know available interactions? We need a way to declare them. Without that this MSC is pretty useless IMHO.

Are interactions specific to a room? or to a user account?

Copy link
Author

Choose a reason for hiding this comment

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

I am open to suggestion on how to specify those registration events. As I said, I started with a barebones proposal.

Copy link
Author

@erkinalp erkinalp Dec 30, 2020

Choose a reason for hiding this comment

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

They are specific to a room and a user (the user responding to the interaction). Notification wording should have clarified that.

@@ -0,0 +1,54 @@
# MSC2929: Interaction events
Copy link
Contributor

Choose a reason for hiding this comment

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

This MSC does not explains how the app reacting to the interaction should be notified. Should it listen to events in the room? So it should have an user that joins the room?

I think this miss a point of slack / discord / and others integrations: their simplicity. You can do an app for slack by just writing a web server that listen on a specific endpoint. Listening to a room's events is a lot more complex.

Copy link
Author

@erkinalp erkinalp Dec 29, 2020

Choose a reason for hiding this comment

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

Should it listen to events in the room? So it should have an user that joins the room

Yes, it has to join the room and this is by design. Re. notification thing, I am going to address it by designing a notification system that will not require the bot to listen to all room events, but only to those interactions (bar E2EE rooms, where I deliberately omit that capability and require listening on all events). More on that soon.

Copy link
Contributor

@erdnaxeli erdnaxeli Dec 30, 2020

Choose a reason for hiding this comment

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

Yes, it has to join the room and this is by design

So that means bots, and it excludes slash-like commands

Copy link
Author

Choose a reason for hiding this comment

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

So that means bots, and it excludes slash-like commands

In my proposal, you would send commands to bot's "profile room" to achieve slash-like commands.

proposals/2929-interaction-events.md Show resolved Hide resolved
Comment on lines +3 to +4
Interaction events are intended to create a standardised way for bots or other third party applications
to interact with other users. IRC, Telegram, Discord solve this using slash commands in the user side.
Copy link
Contributor

Choose a reason for hiding this comment

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

Bots and slash command (like /giphy on slack) are two very different type of application. A bot need to have its own user and needs to join the room, while a slash command could be called from anywhere without knowing about where it is used.

I think the MSC should consider both cases. I even think the MSC should focus on slash commands and define a full protocol for them, while bots already work well (using text messages and command starting with a specific character, like "!dosomething").

Copy link
Author

@erkinalp erkinalp Dec 29, 2020

Choose a reason for hiding this comment

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

Both problems are readily solvable by clever use of rooms. MSC1769 solves the publicly visible global command thing by enabling you to post to bot's room "wall". OTOH, private commands could be DMd to the bot.

Copy link
Contributor

@erdnaxeli erdnaxeli Dec 30, 2020

Choose a reason for hiding this comment

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

But that means any command have to implement the matrix client-server protocol (managing access token, doing sync, …). I am sure not we need it.

Copy link
Author

@erkinalp erkinalp Dec 30, 2020

Choose a reason for hiding this comment

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

I designed interaction events as extensible as possible. Lightweight authentication schemes you suggest will cause security nightmare with that broad capability I propose (mind you, those implementation-defined events will be allowed to target pretty much anything, response flows are also implementation defined). Therefore I cannot allow a shortcut authentication scheme like Slack apps and Discord webhooks use.

proposals/2929-interaction-events.md Show resolved Hide resolved
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
…vents

Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney<erkinalp9035@gmail.com>
@erkinalp erkinalp mentioned this pull request Feb 13, 2021
2 tasks
@turt2live turt2live added the needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. label Jun 8, 2021
@erkinalp erkinalp marked this pull request as draft June 13, 2021 17:00
@richvdh richvdh deleted the branch matrix-org:master August 27, 2021 18:24
@richvdh richvdh closed this Aug 27, 2021
@turt2live turt2live added abandoned A proposal where the author/shepherd is not responsive and removed proposal-in-review labels Aug 27, 2021
@jackmawer
Copy link

i'd like to signal some continued interest on my part with this MSC, as I think interactions brings a lot of power in terms of user interaction with bots.
could any maintainers point out what would be needed to actually move this msc forward? is it just a case of creating an implementation?

@turt2live
Copy link
Member

This MSC is declared abandoned, so a new MSC would need to be started. For process questions it is generally best to visit #matrix-spec:matrix.org on Matrix rather than asking on MSCs directly (we tend to ignore comments on closed/merged MSCs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned A proposal where the author/shepherd is not responsive 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.

None yet

7 participants