mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
bridgev2/matrix: fix decrypting events in GetEvent
Some checks failed
Some checks failed
This commit is contained in:
parent
9f327602f6
commit
32da107299
1 changed files with 2 additions and 2 deletions
|
|
@ -714,10 +714,10 @@ func (as *ASIntent) GetEvent(ctx context.Context, roomID id.RoomID, eventID id.E
|
|||
}
|
||||
|
||||
if evt.Type == event.EventEncrypted {
|
||||
if as.Connector.Config.Encryption.DeleteKeys.RatchetOnDecrypt {
|
||||
if as.Connector.Crypto == nil || as.Connector.Config.Encryption.DeleteKeys.RatchetOnDecrypt {
|
||||
return nil, errors.New("can't decrypt the event")
|
||||
}
|
||||
return as.Matrix.Crypto.Decrypt(ctx, evt)
|
||||
return as.Connector.Crypto.Decrypt(ctx, evt)
|
||||
}
|
||||
|
||||
return evt, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue