From 0b2fd69bf1cde66faecd5267c7e8e1d2568a31c6 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 17 Sep 2020 22:01:17 +0300 Subject: [PATCH] Send error notice if decrypting event fails --- matrix.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/matrix.go b/matrix.go index 3aefd69..f4f269f 100644 --- a/matrix.go +++ b/matrix.go @@ -339,6 +339,9 @@ func (mx *MatrixHandler) HandleEncrypted(evt *event.Event) { decrypted, err := mx.bridge.Crypto.Decrypt(evt) if err != nil { mx.log.Warnfln("Failed to decrypt %s: %v", evt.ID, err) + _, _ = mx.bridge.Bot.SendNotice(evt.RoomID, fmt.Sprintf( + "\u26a0 Your message was not bridged: %v. " + + "Try restarting your client if this error keeps happening.", err)) return } mx.bridge.EventProcessor.Dispatch(decrypted)