Fix replies in encrypted rooms
This commit is contained in:
parent
5a611146cb
commit
44b399790b
2
go.mod
2
go.mod
@ -16,7 +16,7 @@ require (
|
|||||||
gopkg.in/yaml.v2 v2.3.0
|
gopkg.in/yaml.v2 v2.3.0
|
||||||
maunium.net/go/mauflag v1.0.0
|
maunium.net/go/mauflag v1.0.0
|
||||||
maunium.net/go/maulogger/v2 v2.1.1
|
maunium.net/go/maulogger/v2 v2.1.1
|
||||||
maunium.net/go/mautrix v0.5.5
|
maunium.net/go/mautrix v0.5.6
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/Rhymen/go-whatsapp => github.com/tulir/go-whatsapp v0.3.4
|
replace github.com/Rhymen/go-whatsapp => github.com/tulir/go-whatsapp v0.3.4
|
||||||
|
2
go.sum
2
go.sum
@ -198,3 +198,5 @@ maunium.net/go/mautrix v0.5.4 h1:FX5LXZjdkwjA0ZStVsQo5hyzteiUUNejVvbwv0aZfw4=
|
|||||||
maunium.net/go/mautrix v0.5.4/go.mod h1:FLbMANzwqlsX2Fgm7SDe+E4I3wSa4UxJRKqS5wGkCwA=
|
maunium.net/go/mautrix v0.5.4/go.mod h1:FLbMANzwqlsX2Fgm7SDe+E4I3wSa4UxJRKqS5wGkCwA=
|
||||||
maunium.net/go/mautrix v0.5.5 h1:e0Pql1FdxoNUudx2oXo1gZHMrqIh5MC72cdXEPIrYLA=
|
maunium.net/go/mautrix v0.5.5 h1:e0Pql1FdxoNUudx2oXo1gZHMrqIh5MC72cdXEPIrYLA=
|
||||||
maunium.net/go/mautrix v0.5.5/go.mod h1:FLbMANzwqlsX2Fgm7SDe+E4I3wSa4UxJRKqS5wGkCwA=
|
maunium.net/go/mautrix v0.5.5/go.mod h1:FLbMANzwqlsX2Fgm7SDe+E4I3wSa4UxJRKqS5wGkCwA=
|
||||||
|
maunium.net/go/mautrix v0.5.6 h1:XCpyj3yeSOXpX+HMbF+3rdja97efMv/XchsOHylKdXY=
|
||||||
|
maunium.net/go/mautrix v0.5.6/go.mod h1:FLbMANzwqlsX2Fgm7SDe+E4I3wSa4UxJRKqS5wGkCwA=
|
||||||
|
10
portal.go
10
portal.go
@ -1049,6 +1049,16 @@ func (portal *Portal) SetReply(content *event.MessageEventContent, info whatsapp
|
|||||||
portal.log.Warnln("Failed to get reply target:", err)
|
portal.log.Warnln("Failed to get reply target:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if evt.Type == event.EventEncrypted {
|
||||||
|
_ = evt.Content.ParseRaw(evt.Type)
|
||||||
|
decryptedEvt, err := portal.bridge.Crypto.Decrypt(evt)
|
||||||
|
if err != nil {
|
||||||
|
portal.log.Warnln("Failed to decrypt reply target:", err)
|
||||||
|
} else {
|
||||||
|
evt = decryptedEvt
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ = evt.Content.ParseRaw(evt.Type)
|
||||||
content.SetReply(evt)
|
content.SetReply(evt)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user