aboutsummaryrefslogtreecommitdiff
path: root/federationapi/api
diff options
context:
space:
mode:
authordevonh <devon.dmytro@gmail.com>2023-05-31 16:33:49 +0000
committerGitHub <noreply@github.com>2023-05-31 16:33:49 +0000
commitea6b368ad424a3d2e05135afb7fd0c0801b3609b (patch)
tree416132c5bdc525b9ad93911a40813c0dc3fb4439 /federationapi/api
parentcbdc601f1b6d1c2a648b69ff44b3a49916f4d31a (diff)
Move Invite logic to GMSL (#3086)
This is both the federation receiving & sending side logic (which were previously entangeld in a single function)
Diffstat (limited to 'federationapi/api')
-rw-r--r--federationapi/api/api.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/federationapi/api/api.go b/federationapi/api/api.go
index b53ec3dd..5b49e509 100644
--- a/federationapi/api/api.go
+++ b/federationapi/api/api.go
@@ -62,7 +62,7 @@ type RoomserverFederationAPI interface {
// Handle an instruction to make_leave & send_leave with a remote server.
PerformLeave(ctx context.Context, request *PerformLeaveRequest, response *PerformLeaveResponse) error
// Handle sending an invite to a remote server.
- PerformInvite(ctx context.Context, request *PerformInviteRequest, response *PerformInviteResponse) error
+ SendInvite(ctx context.Context, event gomatrixserverlib.PDU, strippedState []gomatrixserverlib.InviteStrippedState) (gomatrixserverlib.PDU, error)
// Handle an instruction to peek a room on a remote server.
PerformOutboundPeek(ctx context.Context, request *PerformOutboundPeekRequest, response *PerformOutboundPeekResponse) error
// Query the server names of the joined hosts in a room.
@@ -190,9 +190,9 @@ type PerformLeaveResponse struct {
}
type PerformInviteRequest struct {
- RoomVersion gomatrixserverlib.RoomVersion `json:"room_version"`
- Event *rstypes.HeaderedEvent `json:"event"`
- InviteRoomState []fclient.InviteV2StrippedState `json:"invite_room_state"`
+ RoomVersion gomatrixserverlib.RoomVersion `json:"room_version"`
+ Event *rstypes.HeaderedEvent `json:"event"`
+ InviteRoomState []gomatrixserverlib.InviteStrippedState `json:"invite_room_state"`
}
type PerformInviteResponse struct {