Skip to content

Commit 4d84d75

Browse files
committed
Add a note to the federation invite endpoints that invites can be sent twice
As this may be non-obvious when implementing behaviour that is triggered by an incoming invite event. See #2062 for more context.
1 parent cabe846 commit 4d84d75

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

data/api/server-server/invites-v1.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ paths:
2020
put:
2121
summary: Invites a remote user to a room
2222
description: |-
23-
Invites a remote user to a room. Once the event has been signed by both the inviting
23+
Invites a remote user to a room. Once the event has been signed by both the inviting
2424
homeserver and the invited homeserver, it can be sent to all of the servers in the
2525
room by the inviting homeserver.
2626
@@ -32,6 +32,10 @@ paths:
3232
[room version specification](/rooms) for precise event formats. **The request and response
3333
bodies here describe the common event fields in more detail and may be missing other
3434
required fields for a PDU.**
35+
36+
Also note that if the remote homeserver is already in the room, it will receive the
37+
invite event twice; once through this endpoint, and again through a [federation
38+
transaction](https://spec.matrix.org/v1.13/server-server-api/#transactions).
3539
operationId: sendInviteV1
3640
security:
3741
- signedRequest: []

data/api/server-server/invites-v2.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ paths:
2424
This API is nearly identical to the v1 API with the exception of the request
2525
body being different, and the response format fixed.
2626
27-
Invites a remote user to a room. Once the event has been signed by both the inviting
27+
Invites a remote user to a room. Once the event has been signed by both the inviting
2828
homeserver and the invited homeserver, it can be sent to all of the servers in the
2929
room by the inviting homeserver.
3030
@@ -36,6 +36,10 @@ paths:
3636
[room version specification](/rooms) for precise event formats. **The request and response
3737
bodies here describe the common event fields in more detail and may be missing other
3838
required fields for a PDU.**
39+
40+
Also note that if the remote homeserver is already in the room, it will receive the
41+
invite event twice; once through this endpoint, and again through a [federation
42+
transaction](https://spec.matrix.org/v1.13/server-server-api/#transactions).
3943
operationId: sendInviteV2
4044
security:
4145
- signedRequest: []

0 commit comments

Comments
 (0)