Skip to content

Commit 6939e50

Browse files
anoadragon453zecakeh
authored andcommitted
Add a note to the federation invite endpoints that invites can be sent 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]>
1 parent a866546 commit 6939e50

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add a note to the invite endpoints that invites to local users may be received twice over federation if the homeserver is already in the room.

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

Lines changed: 5 additions & 1 deletion
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](/server-server-api/#transactions).
3539
operationId: sendInviteV1
3640
security:
3741
- signedRequest: []

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

Lines changed: 5 additions & 1 deletion
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](/server-server-api/#transactions).
3943
operationId: sendInviteV2
4044
security:
4145
- signedRequest: []

0 commit comments

Comments
 (0)