aboutsummaryrefslogtreecommitdiff
path: root/syncapi/sync
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2023-04-04 18:16:53 +0100
committerGitHub <noreply@github.com>2023-04-04 17:16:53 +0000
commit3691423626c94418388c48c1a91ac69dcd8b196b (patch)
treeab93bff2fe0ad7ba8c0417c55832abc57e14b167 /syncapi/sync
parent985298cfc46cb6b33ab44d32a63a933d03e16429 (diff)
Move GMSL client types to Dendrite (#3045)
GMSL is intended for Federation only. Sister PR to https://github.com/matrix-org/gomatrixserverlib/pull/357
Diffstat (limited to 'syncapi/sync')
-rw-r--r--syncapi/sync/request.go3
-rw-r--r--syncapi/sync/requestpool_test.go3
2 files changed, 4 insertions, 2 deletions
diff --git a/syncapi/sync/request.go b/syncapi/sync/request.go
index e5e5fdb5..61734233 100644
--- a/syncapi/sync/request.go
+++ b/syncapi/sync/request.go
@@ -28,6 +28,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/matrix-org/dendrite/syncapi/storage"
+ "github.com/matrix-org/dendrite/syncapi/synctypes"
"github.com/matrix-org/dendrite/syncapi/types"
userapi "github.com/matrix-org/dendrite/userapi/api"
)
@@ -49,7 +50,7 @@ func newSyncRequest(req *http.Request, device userapi.Device, syncDB storage.Dat
}
// Create a default filter and apply a stored filter on top of it (if specified)
- filter := gomatrixserverlib.DefaultFilter()
+ filter := synctypes.DefaultFilter()
filterQuery := req.URL.Query().Get("filter")
if filterQuery != "" {
if filterQuery[0] == '{' {
diff --git a/syncapi/sync/requestpool_test.go b/syncapi/sync/requestpool_test.go
index faa0b49c..7bce0a0c 100644
--- a/syncapi/sync/requestpool_test.go
+++ b/syncapi/sync/requestpool_test.go
@@ -7,6 +7,7 @@ import (
"time"
"github.com/matrix-org/dendrite/setup/config"
+ "github.com/matrix-org/dendrite/syncapi/synctypes"
"github.com/matrix-org/dendrite/syncapi/types"
"github.com/matrix-org/gomatrixserverlib"
)
@@ -33,7 +34,7 @@ func (d dummyDB) GetPresences(ctx context.Context, userID []string) ([]*types.Pr
return []*types.PresenceInternal{}, nil
}
-func (d dummyDB) PresenceAfter(ctx context.Context, after types.StreamPosition, filter gomatrixserverlib.EventFilter) (map[string]*types.PresenceInternal, error) {
+func (d dummyDB) PresenceAfter(ctx context.Context, after types.StreamPosition, filter synctypes.EventFilter) (map[string]*types.PresenceInternal, error) {
return map[string]*types.PresenceInternal{}, nil
}