From 5e0457708155f4ac71112e6dd8138052b7b30b2f Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 22 Dec 2021 23:04:41 +0200 Subject: [PATCH] Update mautrix-go to fix olm session ordering --- .../upgrades/2021-12-22-crypto-store-last-used.go | 13 +++++++++++++ database/upgrades/upgrades.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 database/upgrades/2021-12-22-crypto-store-last-used.go diff --git a/database/upgrades/2021-12-22-crypto-store-last-used.go b/database/upgrades/2021-12-22-crypto-store-last-used.go new file mode 100644 index 0000000..534fe0a --- /dev/null +++ b/database/upgrades/2021-12-22-crypto-store-last-used.go @@ -0,0 +1,13 @@ +package upgrades + +import ( + "database/sql" + + "maunium.net/go/mautrix/crypto/sql_store_upgrade" +) + +func init() { + upgrades[31] = upgrade{"Split last_used into last_encrypted and last_decrypted in crypto store", func(tx *sql.Tx, c context) error { + return sql_store_upgrade.Upgrades[5](tx, c.dialect.String()) + }} +} diff --git a/database/upgrades/upgrades.go b/database/upgrades/upgrades.go index 3c996c6..5912994 100644 --- a/database/upgrades/upgrades.go +++ b/database/upgrades/upgrades.go @@ -39,7 +39,7 @@ type upgrade struct { fn upgradeFunc } -const NumberOfUpgrades = 31 +const NumberOfUpgrades = 32 var upgrades [NumberOfUpgrades]upgrade diff --git a/go.mod b/go.mod index 0af65a7..d96087c 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b maunium.net/go/mauflag v1.0.0 maunium.net/go/maulogger/v2 v2.3.1 - maunium.net/go/mautrix v0.10.8-0.20211216234047-dc0b05104668 + maunium.net/go/mautrix v0.10.8-0.20211222205631-95662fc3f0f3 ) require ( diff --git a/go.sum b/go.sum index 16c71da..67ca498 100644 --- a/go.sum +++ b/go.sum @@ -221,5 +221,5 @@ maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= maunium.net/go/maulogger/v2 v2.3.1 h1:fwBYJne0pHvJrrIPHK+TAPfyxxbBEz46oVGez2x0ODE= maunium.net/go/maulogger/v2 v2.3.1/go.mod h1:TYWy7wKwz/tIXTpsx8G3mZseIRiC5DoMxSZazOHy68A= -maunium.net/go/mautrix v0.10.8-0.20211216234047-dc0b05104668 h1:vCAYZ11XJr+9hcrR4i30yPtN5UV+4aPOEaAlbtaVkws= -maunium.net/go/mautrix v0.10.8-0.20211216234047-dc0b05104668/go.mod h1:k4Ng5oci83MEbqPL6KOjPdbU7f8v01KlMjR/zTQ+7mA= +maunium.net/go/mautrix v0.10.8-0.20211222205631-95662fc3f0f3 h1:/mhoJYRbniwUh9OEwBJzZPCtEGvpiCWsO+MbPzbqE1o= +maunium.net/go/mautrix v0.10.8-0.20211222205631-95662fc3f0f3/go.mod h1:k4Ng5oci83MEbqPL6KOjPdbU7f8v01KlMjR/zTQ+7mA=