From 91ea5c60c81f584dc455d671e28f6c54231c8281 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Thu, 9 Jul 2026 15:43:03 +0100 Subject: [PATCH] BIOS-35385 mark media retry decrypt failures as non-retryable When a WhatsApp media retry notification fails to decrypt, receiveDirectMediaRetry returned early without setting state.resultType, leaving the zero value GENERAL_ERROR which surfaces a retryable M_NOT_FOUND. Clients then re-download the deterministically-failing media forever (infinite spinner). Set resultType to DECRYPTION_ERROR on decrypt failure so the waiter returns a non-retryable error and the media bubble settles into a stable "media unavailable" state. --- pkg/connector/directmedia.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/connector/directmedia.go b/pkg/connector/directmedia.go index 89a54fc..dbea10d 100644 --- a/pkg/connector/directmedia.go +++ b/pkg/connector/directmedia.go @@ -338,6 +338,9 @@ func (wa *WhatsAppClient) receiveDirectMediaRetry(ctx context.Context, msg *data retryData, err := whatsmeow.DecryptMediaRetryNotification(retry, keys.Key) if err != nil { log.Warn().Err(err).Msg("Failed to decrypt media retry notification") + if state != nil { + state.resultType = waMmsRetry.MediaRetryNotification_DECRYPTION_ERROR + } return } if state != nil {