Skip to content

Fetch full XMA media after embedded URL download failure#271

Open
saulcapital wants to merge 1 commit into
mautrix:mainfrom
saulcapital:fix-xma-fetch-after-embedded-download-failure
Open

Fetch full XMA media after embedded URL download failure#271
saulcapital wants to merge 1 commit into
mautrix:mainfrom
saulcapital:fix-xma-fetch-after-embedded-download-failure

Conversation

@saulcapital

Copy link
Copy Markdown

Fix XMA media conversion when the embedded media URL is stale.

Instagram posts and reels can contain embedded signed CDN URLs that expire. The converter currently tries to download that embedded URL first, and only calls fetchFullXMA after that download succeeds, so if the embedded URL is stale, the bridge gives up before reaching fetchFullXMA, even though fetchFullXMA can independently ask the Instagram API for fresh media data and a new downloadable media URL.

This fixes the failed embedded-download path to call fetchFullXMA too, using the existing notice as the fallback.

The existing fallback behavior is preserved: if XMA fetching is disabled, or if the fresh fetch/reupload also fails, fetchFullXMA returns the notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant