mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-05 23:52:46 +00:00
refactor: update GMSL (#3058)
Sister PR to https://github.com/matrix-org/gomatrixserverlib/pull/364 Read this commit by commit to avoid going insane.
This commit is contained in:
parent
9fa39263c0
commit
72285b2659
306 changed files with 2117 additions and 1934 deletions
|
@ -36,6 +36,7 @@ import (
|
|||
"github.com/matrix-org/dendrite/test/testrig"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/matrix-org/gomatrixserverlib/fclient"
|
||||
"github.com/matrix-org/gomatrixserverlib/spec"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"golang.org/x/crypto/ed25519"
|
||||
)
|
||||
|
@ -44,7 +45,7 @@ type fakeFedClient struct {
|
|||
fedclient.FederationClient
|
||||
}
|
||||
|
||||
func (f *fakeFedClient) LookupRoomAlias(ctx context.Context, origin, s gomatrixserverlib.ServerName, roomAlias string) (res fclient.RespDirectory, err error) {
|
||||
func (f *fakeFedClient) LookupRoomAlias(ctx context.Context, origin, s spec.ServerName, roomAlias string) (res fclient.RespDirectory, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -75,8 +76,8 @@ func TestHandleQueryDirectory(t *testing.T) {
|
|||
_, sk, _ := ed25519.GenerateKey(nil)
|
||||
keyID := signing.KeyID
|
||||
pk := sk.Public().(ed25519.PublicKey)
|
||||
serverName := gomatrixserverlib.ServerName(hex.EncodeToString(pk))
|
||||
req := gomatrixserverlib.NewFederationRequest("GET", serverName, testOrigin, "/query/directory?room_alias="+url.QueryEscape("#room:server"))
|
||||
serverName := spec.ServerName(hex.EncodeToString(pk))
|
||||
req := fclient.NewFederationRequest("GET", serverName, testOrigin, "/query/directory?room_alias="+url.QueryEscape("#room:server"))
|
||||
type queryContent struct{}
|
||||
content := queryContent{}
|
||||
err := req.SetContent(content)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue