diff --git a/portal.go b/portal.go index 1ee4fe1..1483292 100644 --- a/portal.go +++ b/portal.go @@ -2304,7 +2304,11 @@ func (portal *Portal) handleMediaRetry(retry *events.MediaRetry, source *User) { errorName := waProto.MediaRetryNotification_MediaRetryNotificationResultType_name[int32(retryData.GetResult())] portal.log.Warnfln("Got error response in media retry notification for %s: %s", retry.MessageID, errorName) portal.log.Debugfln("Error response contents: %s / %s", retryData.GetStanzaId(), retryData.GetDirectPath()) - portal.sendMediaRetryFailureEdit(intent, msg, fmt.Errorf("phone sent error response: %s", errorName)) + if retryData.GetResult() == waProto.MediaRetryNotification_NOT_FOUND { + portal.sendMediaRetryFailureEdit(intent, msg, whatsmeow.ErrMediaNotAvailableOnPhone) + } else { + portal.sendMediaRetryFailureEdit(intent, msg, fmt.Errorf("phone sent error response: %s", errorName)) + } return }