Update mautrix-go

This commit is contained in:
Tulir Asokan 2022-08-04 20:42:03 +03:00
parent 5ba69f7e8e
commit e50ac52014
4 changed files with 6 additions and 6 deletions

View File

@ -19,8 +19,8 @@ package config
import (
"strings"
"maunium.net/go/mautrix/appservice"
"maunium.net/go/mautrix/bridge/bridgeconfig"
"maunium.net/go/mautrix/util"
up "maunium.net/go/mautrix/util/configupgrade"
)
@ -128,7 +128,7 @@ func DoUpgrade(helper *up.Helper) {
if secret, ok := helper.Get(up.Str, "appservice", "provisioning", "shared_secret"); ok && secret != "generate" {
helper.Set(up.Str, secret, "bridge", "provisioning", "shared_secret")
} else if secret, ok = helper.Get(up.Str, "bridge", "provisioning", "shared_secret"); !ok || secret == "generate" {
sharedSecret := appservice.RandomString(64)
sharedSecret := util.RandomString(64)
helper.Set(up.Str, sharedSecret, "bridge", "provisioning", "shared_secret")
} else {
helper.Copy(up.Str, "bridge", "provisioning", "shared_secret")

2
go.mod
View File

@ -15,7 +15,7 @@ require (
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e
google.golang.org/protobuf v1.28.0
maunium.net/go/maulogger/v2 v2.3.2
maunium.net/go/mautrix v0.11.1-0.20220712101332-3467963a8fe8
maunium.net/go/mautrix v0.11.1-0.20220804164655-0cd3fcce0ca1
)
require (

4
go.sum
View File

@ -108,5 +108,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.2 h1:1XmIYmMd3PoQfp9J+PaHhpt80zpfmMqaShzUTC7FwY0=
maunium.net/go/maulogger/v2 v2.3.2/go.mod h1:TYWy7wKwz/tIXTpsx8G3mZseIRiC5DoMxSZazOHy68A=
maunium.net/go/mautrix v0.11.1-0.20220712101332-3467963a8fe8 h1:/i2u7iVWhfRcHieby7+uhog6k9yzIauYqVCESpCfw4s=
maunium.net/go/mautrix v0.11.1-0.20220712101332-3467963a8fe8/go.mod h1:85mjebfgKX7jjca7XNKTt7lHueX3YQsFUU+5o/FxpTw=
maunium.net/go/mautrix v0.11.1-0.20220804164655-0cd3fcce0ca1 h1:+Nx9Zt9byh6GdzteyblAHb6mpi1Vf7/R9wLDnzjVb20=
maunium.net/go/mautrix v0.11.1-0.20220804164655-0cd3fcce0ca1/go.mod h1:85mjebfgKX7jjca7XNKTt7lHueX3YQsFUU+5o/FxpTw=

View File

@ -1889,7 +1889,7 @@ func (portal *Portal) convertListMessage(intent *appservice.IntentAPI, source *U
body = fmt.Sprintf("%s\n\n%s", msg.GetTitle(), body)
}
}
randomID := appservice.RandomString(64)
randomID := util.RandomString(64)
body = fmt.Sprintf("%s\n%s", body, randomID)
if msg.GetFooterText() != "" {
body = fmt.Sprintf("%s\n\n%s", body, msg.GetFooterText())