Skip to content

[pending verification] fix(downloadMedia): simplify and add RMR recovery for NEED_POKE#85

Open
Adi1231234 wants to merge 1 commit intomain-with-fixesfrom
fix/media-download-rmr-main-with-fixes
Open

[pending verification] fix(downloadMedia): simplify and add RMR recovery for NEED_POKE#85
Adi1231234 wants to merge 1 commit intomain-with-fixesfrom
fix/media-download-rmr-main-with-fixes

Conversation

@Adi1231234
Copy link
Copy Markdown
Owner

Summary

Same as PR #84 (for main-with-fixes-and-logs) but without diagnostic logging.

  • Let WhatsApp Web's msg.downloadMedia() handle resolve (entries, RMR on 404, download, decrypt, LRU cache)
  • Add RMR recovery: on NEED_POKE, mark entry off-server to force RMR on next attempt
  • Read data via downloadAndMaybeDecrypt cache hit after resolve
  • Throw on permanent failures instead of returning undefined, so retry can bail

Test plan

  • Verify normal media downloads still work (image, video, document)
  • Monitor GCP logs for NEED_POKE recovery attempts

@Adi1231234 Adi1231234 force-pushed the fix/media-download-rmr-main-with-fixes branch 2 times, most recently from d8e6bd7 to fad4e27 Compare March 21, 2026 02:31
@Adi1231234 Adi1231234 changed the title fix(downloadMedia): simplify and add RMR recovery for NEED_POKE [pending verification] fix(downloadMedia): simplify and add RMR recovery for NEED_POKE Mar 21, 2026
wrap msg.downloadMedia() in try-catch since it can throw during
resolution. Add NEED_POKE recovery that marks the download entry
as off-server to force RMR retry. Expand failure conditions to
include NEED_POKE and REUPLOADING stages, and throw an error
instead of returning null so callers get a clear failure signal.
@Adi1231234 Adi1231234 force-pushed the fix/media-download-rmr-main-with-fixes branch from fad4e27 to 693965d Compare April 6, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant