Repository navigation
Find the file id of a quoted picture for a video - #320
Merged
Merged
Conversation
The dialog knows a quoted picture only by its unique id, so a video asked for in a reply to a picture got a reference (or frame) with an empty file_id; getFile refused it and the video was made from text alone. The video worker now looks the file id up in the Telegram file store when the job carries none.
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
The live test of #319 failed to use the picture. In job 6001000 (
/video вертикально как этот персонаж танцует гопак, sent as a reply to a picture) the bot stored the reference as{"file_id": "", "file_unique_id": "AQADLStrG3rUiEh9"}:file_unique_idonly:collect_dialog_attachmentsadds them first, and the full attachment from the reply is then deduplicated away.getFilereturned "Bad Request: file_id not specified".references=0).Frames have the same gap, so "оживи" in a reply to a picture was affected too.
TelegramVideoFramesnow takes thePostgresTelegramFileStore. When a job carries nofile_id, the worker looks uplatest_file_idbyfile_unique_id; the draw edit path resolves quoted pictures the same way. Thetelegram_filesrow for this picture exists, with an 84-character file id.Checks
cargo fmt --allcargo clippy -p openplotva-app --all-targets -- -D warningscargo test -p openplotva-app: 1503 passed