mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-09-27 20:18:59 +02:00
Fix incorrect error check after retrying decryption
This commit is contained in:
parent
8348d5539b
commit
43c7d50721
1 changed files with 1 additions and 1 deletions
|
@ -380,7 +380,7 @@ func (mx *MatrixHandler) waitLongerForSession(evt *event.Event) {
|
||||||
if mx.bridge.Crypto.WaitForSession(evt.RoomID, content.SenderKey, content.SessionID, extendedTimeout) {
|
if mx.bridge.Crypto.WaitForSession(evt.RoomID, content.SenderKey, content.SessionID, extendedTimeout) {
|
||||||
mx.log.Debugfln("Got session %s after waiting more, trying to decrypt %s again", content.SessionID, evt.ID)
|
mx.log.Debugfln("Got session %s after waiting more, trying to decrypt %s again", content.SessionID, evt.ID)
|
||||||
decrypted, err := mx.bridge.Crypto.Decrypt(evt)
|
decrypted, err := mx.bridge.Crypto.Decrypt(evt)
|
||||||
if err != nil {
|
if err == nil {
|
||||||
mx.bridge.EventProcessor.Dispatch(decrypted)
|
mx.bridge.EventProcessor.Dispatch(decrypted)
|
||||||
_, _ = mx.bridge.Bot.RedactEvent(evt.RoomID, resp.EventID)
|
_, _ = mx.bridge.Bot.RedactEvent(evt.RoomID, resp.EventID)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue