Fix video stories shared in DMs showing as still images#249
Open
Pavel12431432 wants to merge 1 commit intomautrix:mainfrom
Open
Fix video stories shared in DMs showing as still images#249Pavel12431432 wants to merge 1 commit intomautrix:mainfrom
Pavel12431432 wants to merge 1 commit intomautrix:mainfrom
Conversation
Add handling for story XMA attachments where CTA.NativeUrl uses the https://www.instagram.com/stories/ format with reel_id query parameter. Uses FetchReel API to retrieve the full story media instead of falling through to the default case which only returned the thumbnail. Also fix MIME type in instagramFetchedMediaToMatrix: when VideoVersions are present, set MIME to video/mp4 instead of using the XMA preview MIME type (image/jpeg), which caused video stories to be sent as image messages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fetchFullXMAwhereCTA.NativeUrlis a fullhttps://www.instagram.com/stories/username/mediaID?reel_id=...URL. This format was previously unhandled and fell through to the default case, returning only the thumbnail.FetchReelAPI (with thereel_idfrom query parameters) to retrieve full story media, matching the approach used by the existing/stories/direct/handler.instagramFetchedMediaToMatrix: whenVideoVersionsare found in the API response, set MIME tovideo/mp4instead of using the XMA preview MIME type (image/jpeg). Without this, video content was sent as image messages.Test plan
l.facebook.com/l.phpredirect wrapper onCTA.ActionUrl/stories/direct/and type 2https://instagram.com/stories/) is unaffected