Skip to content

Conversation

@A-newstart
Copy link

Summary
This PR fixes a bug where passing a file_id for video together with a cover would not attach the cover to the sent media. Previously the code converted the cover to a helper/input object but did not attach it to the media returned by utils.get_input_media_from_file_id(video, FileType.VIDEO, ...). As a result, videos sent via file_id lost their video_cover.

Root cause

When video was a local file or URL we constructed raw.types.InputMediaUploadedDocument / InputMediaDocumentExternal and set video_cover correctly.

When video was a file_id, we used utils.get_input_media_from_file_id(...) to build media but never assigned media.video_cover = vidcover_file.

note: used ai to solve this dont know if its correct or not but worked and hope problem got detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant