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:
kegsay 2023-04-19 15:50:33 +01:00 committed by GitHub
parent 9fa39263c0
commit 72285b2659
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
306 changed files with 2117 additions and 1934 deletions

View file

@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/spec"
"github.com/matrix-org/dendrite/syncapi/storage"
"github.com/matrix-org/dendrite/syncapi/synctypes"
@ -46,7 +46,7 @@ func (p *ReceiptStreamProvider) IncrementalSync(
) types.StreamPosition {
var joinedRooms []string
for roomID, membership := range req.Rooms {
if membership == gomatrixserverlib.Join {
if membership == spec.Join {
joinedRooms = append(joinedRooms, roomID)
}
}
@ -88,7 +88,7 @@ func (p *ReceiptStreamProvider) IncrementalSync(
}
ev := synctypes.ClientEvent{
Type: gomatrixserverlib.MReceipt,
Type: spec.MReceipt,
}
content := make(map[string]ReceiptMRead)
for _, receipt := range receipts {
@ -119,5 +119,5 @@ type ReceiptMRead struct {
}
type ReceiptTS struct {
TS gomatrixserverlib.Timestamp `json:"ts"`
TS spec.Timestamp `json:"ts"`
}