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

@ -23,6 +23,7 @@ import (
"github.com/matrix-org/dendrite/federationapi/storage/shared/receipt"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/spec"
)
// AssociatePDUWithDestination creates an association that the
@ -30,7 +31,7 @@ import (
// to which servers.
func (d *Database) AssociatePDUWithDestinations(
ctx context.Context,
destinations map[gomatrixserverlib.ServerName]struct{},
destinations map[spec.ServerName]struct{},
dbReceipt *receipt.Receipt,
) error {
return d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
@ -52,7 +53,7 @@ func (d *Database) AssociatePDUWithDestinations(
// the next pending transaction, up to the limit specified.
func (d *Database) GetPendingPDUs(
ctx context.Context,
serverName gomatrixserverlib.ServerName,
serverName spec.ServerName,
limit int,
) (
events map[*receipt.Receipt]*gomatrixserverlib.HeaderedEvent,
@ -105,7 +106,7 @@ func (d *Database) GetPendingPDUs(
// successfully.
func (d *Database) CleanPDUs(
ctx context.Context,
serverName gomatrixserverlib.ServerName,
serverName spec.ServerName,
receipts []*receipt.Receipt,
) error {
if len(receipts) == 0 {
@ -148,6 +149,6 @@ func (d *Database) CleanPDUs(
// waiting to be sent.
func (d *Database) GetPendingPDUServerNames(
ctx context.Context,
) ([]gomatrixserverlib.ServerName, error) {
) ([]spec.ServerName, error) {
return d.FederationQueuePDUs.SelectQueuePDUServerNames(ctx, nil)
}