aboutsummaryrefslogtreecommitdiff
path: root/federationapi
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-06-11 15:07:16 +0100
committerGitHub <noreply@github.com>2020-06-11 15:07:16 +0100
commit25cd2dd1c925fa0c1eeb27a3cd71e668344102ad (patch)
tree9635d69896a9b8ff548a6708d6ad2e2430309d0d /federationapi
parent89d61c487751e4beca71d396d719758ae4a98332 (diff)
Remove unused internal APIs (#1117)
Diffstat (limited to 'federationapi')
-rw-r--r--federationapi/routing/send_test.go9
-rw-r--r--federationapi/routing/state.go13
2 files changed, 1 insertions, 21 deletions
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 {