1
0
Fork 0
mirror of https://github.com/mautrix/whatsapp.git synced 2026-07-10 16:09:05 -04:00

Compare commits

...

1 commit

Author SHA1 Message Date
Nick Mills-Barrett
91ea5c60c8 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.
2026-07-09 15:43:03 +01:00

View file

@ -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 {