From 25cd2dd1c925fa0c1eeb27a3cd71e668344102ad Mon Sep 17 00:00:00 2001 From: Kegsay Date: Thu, 11 Jun 2020 15:07:16 +0100 Subject: Remove unused internal APIs (#1117) --- federationapi/routing/send_test.go | 9 --------- federationapi/routing/state.go | 13 +------------ 2 files changed, 1 insertion(+), 21 deletions(-) (limited to 'federationapi') diff --git a/federationapi/routing/send_test.go b/federationapi/routing/send_test.go index b81f1c00..9081a870 100644 --- a/federationapi/routing/send_test.go +++ b/federationapi/routing/send_test.go @@ -181,15 +181,6 @@ func (t *testRoomserverAPI) QueryMembershipsForRoom( return fmt.Errorf("not implemented") } -// Query a list of invite event senders for a user in a room. -func (t *testRoomserverAPI) QueryInvitesForUser( - ctx context.Context, - request *api.QueryInvitesForUserRequest, - response *api.QueryInvitesForUserResponse, -) error { - return fmt.Errorf("not implemented") -} - // Query whether a server is allowed to see an event func (t *testRoomserverAPI) QueryServerAllowedToSeeEvent( ctx context.Context, diff --git a/federationapi/routing/state.go b/federationapi/routing/state.go index f90c494c..04a18904 100644 --- a/federationapi/routing/state.go +++ b/federationapi/routing/state.go @@ -107,15 +107,13 @@ func getState( return nil, &util.JSONResponse{Code: http.StatusNotFound, JSON: nil} } - authEventIDs := getIDsFromEventRef(event.AuthEvents()) - var response api.QueryStateAndAuthChainResponse err := rsAPI.QueryStateAndAuthChain( ctx, &api.QueryStateAndAuthChainRequest{ RoomID: roomID, PrevEventIDs: []string{eventID}, - AuthEventIDs: authEventIDs, + AuthEventIDs: event.AuthEventIDs(), }, &response, ) @@ -134,15 +132,6 @@ func getState( }, nil } -func getIDsFromEventRef(events []gomatrixserverlib.EventReference) []string { - IDs := make([]string, len(events)) - for i := range events { - IDs[i] = events[i].EventID - } - - return IDs -} - func getIDsFromEvent(events []gomatrixserverlib.Event) []string { IDs := make([]string, len(events)) for i := range events { -- cgit v1.2.3