Skip to content

Conversation

anoadragon453
Copy link
Member

@anoadragon453 anoadragon453 commented Jan 28, 2025

As this may be non-obvious when implementing behaviour that is triggered by an incoming invite event.

See #2062 for more context. Closes #2062.

Preview: https://pr2067--matrix-spec-previews.netlify.app

…t twice

As this may be non-obvious when implementing behaviour that is triggered by an incoming invite
event.

See #2062 for more context.
Copy link
Contributor

@zecakeh zecakeh left a comment

Choose a reason for hiding this comment

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

Regarding the discussion in #2062, I actually saw this endpoint only as a request from the inviting homeserver to the invited homeserver to sign the event, not that it should have other side effects. But it's true that the description is vague and doesn't actually say what should happen on the invitee's side.

As a side note, it is also not clear in which order the signatures are applied here. Should the event already have the signature from the inviting homeserver? It would make sense that the invited homeserver checks the signature before signing it itself. The text doesn't say anything about it, and the definitions don't include a signatures field in the request (or the response for that matter), but the data has an example of a request with the signatures field (which appears in #2076).

@richvdh
Copy link
Member

richvdh commented Feb 25, 2025

Should the event already have the signature from the inviting homeserver?

Synapse's implementation of PUT /_matrix/federation/v2/invite/{roomId}/{eventId} seems to require a valid signature on the incoming event, so I think the answer to this is "yes". That doesn't seem to be specced though, and it could do with being.

@richvdh
Copy link
Member

richvdh commented Feb 25, 2025

I actually saw this endpoint only as a request from the inviting homeserver to the invited homeserver to sign the event, not that it should have other side effects.

It has to have a side-effect, at least in the case where the invited homeserver is not already in the room: the server must tell the user they have been invited and allow them to join the room if they wish.

@zecakeh
Copy link
Contributor

zecakeh commented Feb 26, 2025

I actually saw this endpoint only as a request from the inviting homeserver to the invited homeserver to sign the event, not that it should have other side effects.

It has to have a side-effect, at least in the case where the invited homeserver is not already in the room: the server must tell the user they have been invited and allow them to join the room if they wish.

Ah right, sorry for the noise then.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

@anoadragon453 could you make the requested changes please

Co-authored-by: Kévin Commaille <[email protected]>
@anoadragon453 anoadragon453 requested a review from richvdh May 1, 2025 14:00
@richvdh richvdh merged commit a8c3269 into main May 8, 2025
12 checks passed
@richvdh richvdh deleted the anoa/invite_duplication_notice branch May 8, 2025 09:09
Johennes pushed a commit to Johennes/matrix-spec that referenced this pull request May 30, 2025
…t twice (matrix-org#2067)

... as this may be non-obvious when implementing behaviour that is triggered by an incoming invite
event.

See matrix-org#2062 for more context.

Co-authored-by: Kévin Commaille <[email protected]>
tcpipuk pushed a commit to tcpipuk/matrix-spec that referenced this pull request Jul 30, 2025
…t twice (matrix-org#2067)

... as this may be non-obvious when implementing behaviour that is triggered by an incoming invite
event.

See matrix-org#2062 for more context.

Co-authored-by: Kévin Commaille <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document that incoming invite events will reach a homeserver twice - once over /invite and again over /send
3 participants