forked from MirrorHub/mautrix-whatsapp
Update mautrix-go
This commit is contained in:
parent
f7064812ea
commit
37f4182aa7
3 changed files with 4 additions and 6 deletions
2
go.mod
2
go.mod
|
@ -16,7 +16,7 @@ require (
|
|||
golang.org/x/net v0.1.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
maunium.net/go/maulogger/v2 v2.3.2
|
||||
maunium.net/go/mautrix v0.12.3-0.20221104105050-0b958ab2a7b6
|
||||
maunium.net/go/mautrix v0.12.3-0.20221105092350-7f87f6340195
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
4
go.sum
4
go.sum
|
@ -120,5 +120,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.12.3-0.20221104105050-0b958ab2a7b6 h1:lsZ8gJaz3Mx2JnJKz0be7CQm5APMmZHSrx86ElJ2y6E=
|
||||
maunium.net/go/mautrix v0.12.3-0.20221104105050-0b958ab2a7b6/go.mod h1:IJK6VRAV5wL4IOmu31GT8NRmSEAh2iNBxMNA/ZfA5xM=
|
||||
maunium.net/go/mautrix v0.12.3-0.20221105092350-7f87f6340195 h1:IRPl+nU71I/fXjK6xDYPHC4Ego4YIBMce63Ief2kNjM=
|
||||
maunium.net/go/mautrix v0.12.3-0.20221105092350-7f87f6340195/go.mod h1:IJK6VRAV5wL4IOmu31GT8NRmSEAh2iNBxMNA/ZfA5xM=
|
||||
|
|
|
@ -38,9 +38,7 @@ var userIDRegex *regexp.Regexp
|
|||
|
||||
func (br *WABridge) ParsePuppetMXID(mxid id.UserID) (jid types.JID, ok bool) {
|
||||
if userIDRegex == nil {
|
||||
userIDRegex = regexp.MustCompile(fmt.Sprintf("^@%s:%s$",
|
||||
br.Config.Bridge.FormatUsername("([0-9]+)"),
|
||||
br.Config.Homeserver.Domain))
|
||||
userIDRegex = br.Config.MakeUserIDRegex("([0-9]+)")
|
||||
}
|
||||
match := userIDRegex.FindStringSubmatch(string(mxid))
|
||||
if len(match) == 2 {
|
||||
|
|
Loading…
Reference in a new issue