diff --git a/clientapi/routing/key_crosssigning.go b/clientapi/routing/key_crosssigning.go index 70444d91..26e0014b 100644 --- a/clientapi/routing/key_crosssigning.go +++ b/clientapi/routing/key_crosssigning.go @@ -8,11 +8,12 @@ package routing import ( "context" - "github.com/matrix-org/gomatrixserverlib/fclient" - "github.com/sirupsen/logrus" "net/http" "time" + "github.com/matrix-org/gomatrixserverlib/fclient" + "github.com/sirupsen/logrus" + "github.com/element-hq/dendrite/clientapi/auth" "github.com/element-hq/dendrite/clientapi/auth/authtypes" "github.com/element-hq/dendrite/clientapi/httputil" @@ -132,7 +133,7 @@ func UploadCrossSigningDeviceKeys( } } -func keysDiffer(existingMasterKey fclient.CrossSigningKey, keyResp api.QueryKeysResponse, uploadReq *crossSigningRequest, userID string, ) bool { +func keysDiffer(existingMasterKey fclient.CrossSigningKey, keyResp api.QueryKeysResponse, uploadReq *crossSigningRequest, userID string) bool { masterKeyEqual := existingMasterKey.Equal(&uploadReq.MasterKey) if !masterKeyEqual { return true diff --git a/clientapi/routing/key_crosssigning_test.go b/clientapi/routing/key_crosssigning_test.go index 0e27279b..94666f37 100644 --- a/clientapi/routing/key_crosssigning_test.go +++ b/clientapi/routing/key_crosssigning_test.go @@ -5,6 +5,11 @@ import ( "context" "encoding/json" "fmt" + "net/http" + "net/http/httptest" + "strings" + "testing" + "github.com/element-hq/dendrite/setup/config" "github.com/element-hq/dendrite/test" "github.com/element-hq/dendrite/test/testrig" @@ -12,10 +17,6 @@ import ( "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/matrix-org/gomatrixserverlib/spec" - "net/http" - "net/http/httptest" - "strings" - "testing" ) type mockKeyAPI struct {