Repository navigation
msgconv: fix size and mimetype of converted animated stickers - #1059
Merged
Merged
Conversation
Contributor
|
No issues found.
All required CI checks passed on
Select any unchecked box below to run or rerun that agent. Full resultsIndent Review Agent
|
Fizzadar
reviewed
Nov 18, 2026
| TypeDescription: "sticker", | ||
| } | ||
| dbKey := database.Key(fmt.Sprintf("stickercache:%x", part.Info.BridgedSticker.ID)) | ||
| dbKey := database.Key(fmt.Sprintf("stickercache:v2:%x", part.Info.BridgedSticker.ID)) |
Contributor
There was a problem hiding this comment.
It changes the sticker pack cache key so packs imported before this fix get re-uploaded once with the correct size, instead of keeping the cached zip size forever.
Contributor
|
This session is private. Request access: https://app.indent.com/c/01a1dcfa-5e17-768d-a926-6e8fbdc70c56 |
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.
Animated stickers come from WhatsApp as a zip (
application/was), but the bridge only ever delivers theanimation.jsoninside it (or the png/gif/webp/webm whenanimated_stickerconverts it).info.sizeis still set from the message'sFileLength, which is the size of the zip, so clients show the wrong size. A user saw 18,113 B displayed and got a 177,950 B file.With reupload, the size is now taken from the bytes that actually get uploaded. With direct media, the extraction only happens when the file is downloaded, so the size isn't known yet and is left out, both for messages and for imported sticker packs. The webm target also sent
image/webm, which is nowvideo/webmlike in the Telegram bridge. I also bumped the sticker pack cache key, so pack items that were cached with the zip size get reuploaded once.I tested this on a real account by sending the same Lottie sticker to a bridged DM (9,406 B zip, 177,199 B JSON):
image/webm27932 /image/webp149754video/webm/ size 149754image/webpLinear: https://linear.app/beeper/issue/PLAT-40523
Tag
@indentto continue the conversation here.