aboutsummaryrefslogtreecommitdiff
path: root/federationapi/consumers/receipts.go
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2023-04-19 15:50:33 +0100
committerGitHub <noreply@github.com>2023-04-19 15:50:33 +0100
commit72285b2659a31ebd52c91799c17105d81d996f40 (patch)
tree1855395f5efdc3ea6051dd502882bf62aaa57e7c /federationapi/consumers/receipts.go
parent9fa39263c0a4a8d349c8715f6ba30cae30b1b73a (diff)
refactor: update GMSL (#3058)
Sister PR to https://github.com/matrix-org/gomatrixserverlib/pull/364 Read this commit by commit to avoid going insane.
Diffstat (limited to 'federationapi/consumers/receipts.go')
-rw-r--r--federationapi/consumers/receipts.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/federationapi/consumers/receipts.go b/federationapi/consumers/receipts.go
index 200c06e6..1407a88b 100644
--- a/federationapi/consumers/receipts.go
+++ b/federationapi/consumers/receipts.go
@@ -28,6 +28,7 @@ import (
"github.com/matrix-org/dendrite/setup/process"
syncTypes "github.com/matrix-org/dendrite/syncapi/types"
"github.com/matrix-org/gomatrixserverlib"
+ "github.com/matrix-org/gomatrixserverlib/spec"
"github.com/nats-io/nats.go"
log "github.com/sirupsen/logrus"
)
@@ -39,7 +40,7 @@ type OutputReceiptConsumer struct {
durable string
db storage.Database
queues *queue.OutgoingQueues
- isLocalServerName func(gomatrixserverlib.ServerName) bool
+ isLocalServerName func(spec.ServerName) bool
topic string
}
@@ -107,7 +108,7 @@ func (t *OutputReceiptConsumer) onMessage(ctx context.Context, msgs []*nats.Msg)
return true
}
- receipt.Timestamp = gomatrixserverlib.Timestamp(timestamp)
+ receipt.Timestamp = spec.Timestamp(timestamp)
joined, err := t.db.GetJoinedHosts(ctx, receipt.RoomID)
if err != nil {
@@ -115,7 +116,7 @@ func (t *OutputReceiptConsumer) onMessage(ctx context.Context, msgs []*nats.Msg)
return false
}
- names := make([]gomatrixserverlib.ServerName, len(joined))
+ names := make([]spec.ServerName, len(joined))
for i := range joined {
names[i] = joined[i].ServerName
}
@@ -133,7 +134,7 @@ func (t *OutputReceiptConsumer) onMessage(ctx context.Context, msgs []*nats.Msg)
}
edu := &gomatrixserverlib.EDU{
- Type: gomatrixserverlib.MReceipt,
+ Type: spec.MReceipt,
Origin: string(receiptServerName),
}
if edu.Content, err = json.Marshal(content); err != nil {