aboutsummaryrefslogtreecommitdiff
path: root/clientapi/producers
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-04-24 16:30:25 +0100
committerGitHub <noreply@github.com>2020-04-24 16:30:25 +0100
commit3ab8ebf6b8fbc813bfb3e0e0735e76a69a8ed2dd (patch)
treea5e83730ac7c8e7f8b53b102c4a426a1ce930ba8 /clientapi/producers
parentbe558f02aa956cfff51c5dfcf57575b46254b0db (diff)
More invite support (#979)
* Update gomatixserverlib * Try to build invite stripped state if not given to us * SendInvite improvements * Transpose invite_room_state into invite_state.events for sync API * Remove syncapi debugging output * Use RespInviteV2 * Update gomatrixserverlib * Send the invite event as a normal roomserver event too, for incorporating into room (should this be done by the roomserver automatically for invite inputs?) * Federation sender use invite_room_state, room server try to insert membership state * Check supported room versions on the invite endpoint * Prevent roomserver query API from trying to handle requests for stub rooms * Adding a nolint * Replace IsRoomStub with RoomNIDExcludingStubs, fix query API to use that instead * Review comments
Diffstat (limited to 'clientapi/producers')
-rw-r--r--clientapi/producers/roomserver.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/clientapi/producers/roomserver.go b/clientapi/producers/roomserver.go
index 391ea07b..fac1e3c7 100644
--- a/clientapi/producers/roomserver.go
+++ b/clientapi/producers/roomserver.go
@@ -106,12 +106,15 @@ func (c *RoomserverProducer) SendInputRoomEvents(
func (c *RoomserverProducer) SendInvite(
ctx context.Context, inviteEvent gomatrixserverlib.HeaderedEvent,
inviteRoomState []gomatrixserverlib.InviteV2StrippedState,
+ sendAsServer gomatrixserverlib.ServerName, txnID *api.TransactionID,
) error {
request := api.InputRoomEventsRequest{
InputInviteEvents: []api.InputInviteEvent{{
Event: inviteEvent,
InviteRoomState: inviteRoomState,
RoomVersion: inviteEvent.RoomVersion,
+ SendAsServer: string(sendAsServer),
+ TransactionID: txnID,
}},
}
var response api.InputRoomEventsResponse