Skip to content

MSC4301: Event capability negotiation between clients #4301

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Johennes
Copy link
Contributor

@Johennes Johennes commented Jun 16, 2025

@Johennes Johennes changed the title MSCYYYY: Event capability negotiation between clients MSC4301: Event capability negotiation between clients Jun 16, 2025
@Johennes Johennes force-pushed the johannes/event-capability-negotiation branch from 41b2f7d to 2654cf3 Compare June 16, 2025 10:10
@Johennes Johennes marked this pull request as ready for review June 16, 2025 10:14
@turt2live turt2live added proposal A matrix spec change proposal client-server Client-Server API 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. labels Jun 16, 2025
Copy link
Member

Choose a reason for hiding this comment

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

Implementation requirements:

  • Sending client
  • Receiving client (with support)
  • Receiving client (without support)

Comment on lines +3 to +7
Matrix allows clients to exchange both built-in and custom events with other clients in rooms. There
is, however, no way for a client to understand what types of events the other clients in a room are
able to understand. This is problematic as a compatibility mismatch means that the recipient user
might only be able to see a fallback representation of an event or, in the worst case, nothing at
all. At the same time, the sender is left wholly unaware of the recipient's experience.
Copy link
Member

Choose a reason for hiding this comment

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

This problem area is discussed a lot, usually in the context of extensible events. I'm concerned that this MSC opens up pandora's box again by trying to add a negotiation layer on top of a compatibility layer - this proposal needs a strong rationale for why extensible events is insufficient beyond "it can sometimes result in fallback", which is by design.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this proposal needs a strong rationale for why extensible events is insufficient beyond "it can sometimes result in fallback", which is by design.

This is really it though.

We're using Matrix in the healthcare sector and in some cases it's simply not acceptable to rely on fallback representations. The events to be sent might contain complex medical data that cannot feasibly be condensed into a useful fallback and where the sender requires guarantees that the content will actually be understood because health depends on it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Imho a combination of extensible events and m.status.response would be sufficient. We could add an information like allow_fallback: Boolean or don't add a fallback at all in the extensible event. Then the receiver could answer with an m.status.response so the sender would get notified about displaying issues.

Copy link
Contributor

Choose a reason for hiding this comment

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

For many cases a fallback would be sufficient. E. g. a DICOM event could have an image and file fallback, so the user would get a preview (image fallback) and could download the DICOM (file fallback) and open it in an external software.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those are good points. I suppose in essence the only thing this proposal adds over #4300 is the shortcut of figuring out if an event type will be understood before actually sending the event.

Not having to send the event if the recipient is known to not support it is probably only a meaningful benefit if you're sending extremely large data.

However, being able to downgrade to another event type that the recipient understands feels harder to do with just #4300. What I'm trying to hedge against are cases where there are multiple historic versions of an event type (similar to how some of the email message types here had several versions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-server Client-Server API 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.

3 participants