From 3ab8ebf6b8fbc813bfb3e0e0735e76a69a8ed2dd Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 24 Apr 2020 16:30:25 +0100 Subject: 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 --- syncapi/storage/sqlite3/syncserver.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'syncapi/storage/sqlite3/syncserver.go') diff --git a/syncapi/storage/sqlite3/syncserver.go b/syncapi/storage/sqlite3/syncserver.go index 29051cd0..cdfd29b8 100644 --- a/syncapi/storage/sqlite3/syncserver.go +++ b/syncapi/storage/sqlite3/syncserver.go @@ -799,11 +799,7 @@ func (d *SyncServerDatasource) addInvitesToResponse( return err } for roomID, inviteEvent := range invites { - ir := types.NewInviteResponse() - ir.InviteState.Events = gomatrixserverlib.HeaderedToClientEvents( - []gomatrixserverlib.HeaderedEvent{inviteEvent}, gomatrixserverlib.FormatSync, - ) - // TODO: add the invite state from the invite event. + ir := types.NewInviteResponse(inviteEvent) res.Rooms.Invite[roomID] = *ir } return nil -- cgit v1.2.3