Multiple Media Types in Tweets Not Displayed Simultaneously – if/elif Logic Prevents Rendering of Video/GIF When Photos Are Present
Description:
When a tweet contains more than one type of media (for example, both photos and a video, or a video and a GIF), only one media type is rendered in the frontend. Via Nitter, if a tweet has photos (images) along with a video or GIF, the photos are shown—but the video/GIF is never displayed. This is unexpected behavior since the tweet’s data (as defined in types.nim) supports a combination of media, yet the UI only ever shows one.

Reproduction:

Post or find a tweet that includes both an image (or a photo album) and a video (or a GIF).
example: https://x.com/techhalla/status/1888603721694626034
Visit the tweet’s URL (using Nitter as the frontend). https://nitter.net/techhalla/status/1888603721694626034
Observe that only the photo(s) are rendered, and the video/GIF is missing when there's both image and video—even though the tweet’s payload includes both.

It could be from a quick overview that the media-rendering logic in both the tweet view (in views/tweet.nim) and in the parser version for tweet embeds (in src/parser.nim) is implemented using a mutually exclusive if/elif/elif chain