Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Improve Telegram gif handling #6649

Closed
wants to merge 1 commit into from

Conversation

tulir
Copy link
Member

@tulir tulir commented Aug 20, 2021

Telegram (and basically all other modern chat apps) use video files instead of actual .gif files for any features called "gifs", which makes sense because gif files are huge. However, Matrix doesn't have such modern features, so users will see a full video player instead of a nice looping gif. This change adds support for simple custom flags that can be used to make the video player behave similar to actual .gif files.

The flags are set by the Telegram bridge here: https://github.com/mautrix/telegram/blob/v0.10.1/mautrix_telegram/portal/telegram.py#L252-L260


Here's what your changelog entry will look like:

✨ Features

  • Improve Telegram gif handling (#6649). Contributed by tulir.

Preview: https://611fa00ad6778559e4d35f32--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.

@tulir tulir requested a review from a team as a code owner August 20, 2021 12:20
Telegram (and basically all other modern chat apps) use video files instead of
actual .gif files for any features called "gifs", which makes sense because gif
files are huge. However, Matrix doesn't have such modern features, so users
will see a full video player instead of a nice looping gif. This change adds
support for simple custom flags that can be used to make the video player
behave similar to actual .gif files.

The flags are set by the Telegram bridge here: https://github.com/mautrix/telegram/blob/v0.10.1/mautrix_telegram/portal/telegram.py#L252-L260

Co-authored-by: Marcus Hoffmann <[email protected]>
Signed-off-by: Marcus Hoffmann <[email protected]>
Signed-off-by: Tulir Asokan <[email protected]>
@SimonBrandner SimonBrandner added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Aug 20, 2021
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per #6642, this is not an appropriate approach.

@tulir
Copy link
Member Author

tulir commented Aug 23, 2021

This is about telegram gifs (= short looping video clips with no audio), not stickers. I'm not sure what other approach there is?

(the bridge coincidentally sends animated stickers the same way as gifs, but that's not relevant)

@turt2live turt2live self-requested a review August 23, 2021 22:11
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, in that case I think it'd be best to run this through a fairly brief MSC just so we have documentation to point to for how this works.

@andybalaam
Copy link
Contributor

Marking as draft since it could be plausible, but we'll need an MSC before we can merge.

@andybalaam andybalaam marked this pull request as draft June 22, 2023 14:08
@langleyd langleyd closed this Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants