fix encrypted thread reply, fix From header in thread reply

This commit is contained in:
Aine
2022-11-14 00:38:17 +02:00
parent 519c44e998
commit b9cf336a6d
5 changed files with 69 additions and 14 deletions

View File

@@ -69,6 +69,10 @@ func (b *Bot) onEncryptedMessage(evt *event.Event) {
if evt.Sender == b.lp.GetClient().UserID {
return
}
// ignore encrypted events in noecryption mode
if b.lp.GetMachine() == nil {
return
}
ctx := newContext(evt)
decrypted, err := b.lp.GetMachine().DecryptMegolmEvent(evt)