From a6adf61417a4d7b74e088fdb413d578378873584 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 5 Jan 2022 22:10:05 +0200 Subject: [PATCH] Ignore file length mismatches again --- portal.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/portal.go b/portal.go index 7cbdb15..101ffbd 100644 --- a/portal.go +++ b/portal.go @@ -1692,6 +1692,8 @@ func (portal *Portal) convertMediaMessage(intent *appservice.IntentAPI, source * if errors.Is(err, whatsmeow.ErrNoURLPresent) { portal.log.Debugfln("No URL present error for media message %s, ignoring...", info.ID) return nil + } else if errors.Is(err, whatsmeow.ErrFileLengthMismatch) || errors.Is(err, whatsmeow.ErrInvalidMediaSHA256) { + portal.log.Warnfln("Mismatching media checksums in %s: %v. Ignoring because WhatsApp seems to ignore them too", info.ID, err) } else if err != nil { return portal.makeMediaBridgeFailureMessage(intent, info, err, captionContent) }