Skip to content

Commit

Permalink
Add a note to the federation invite endpoints that invites can be sen…
Browse files Browse the repository at this point in the history
…t twice

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

See #2062 for more context.
  • Loading branch information
anoadragon453 committed Jan 28, 2025
1 parent cabe846 commit 4d84d75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion data/api/server-server/invites-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ paths:
put:
summary: Invites a remote user to a room
description: |-
Invites a remote user to a room. Once the event has been signed by both the inviting
Invites a remote user to a room. Once the event has been signed by both the inviting
homeserver and the invited homeserver, it can be sent to all of the servers in the
room by the inviting homeserver.
Expand All @@ -32,6 +32,10 @@ paths:
[room version specification](/rooms) for precise event formats. **The request and response
bodies here describe the common event fields in more detail and may be missing other
required fields for a PDU.**
Also note that if the remote homeserver is already in the room, it will receive the
invite event twice; once through this endpoint, and again through a [federation
transaction](https://spec.matrix.org/v1.13/server-server-api/#transactions).
operationId: sendInviteV1
security:
- signedRequest: []
Expand Down
6 changes: 5 additions & 1 deletion data/api/server-server/invites-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ paths:
This API is nearly identical to the v1 API with the exception of the request
body being different, and the response format fixed.
Invites a remote user to a room. Once the event has been signed by both the inviting
Invites a remote user to a room. Once the event has been signed by both the inviting
homeserver and the invited homeserver, it can be sent to all of the servers in the
room by the inviting homeserver.
Expand All @@ -36,6 +36,10 @@ paths:
[room version specification](/rooms) for precise event formats. **The request and response
bodies here describe the common event fields in more detail and may be missing other
required fields for a PDU.**
Also note that if the remote homeserver is already in the room, it will receive the
invite event twice; once through this endpoint, and again through a [federation
transaction](https://spec.matrix.org/v1.13/server-server-api/#transactions).
operationId: sendInviteV2
security:
- signedRequest: []
Expand Down

0 comments on commit 4d84d75

Please sign in to comment.