Allow video notes without sound and prevent their creation.
This commit is contained in:
parent
a4e1839089
commit
9e3ad28d09
@ -118,9 +118,14 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo
|
||||
}
|
||||
|
||||
if (animated != nullptr) {
|
||||
// video animation
|
||||
type_attributes--;
|
||||
video = nullptr;
|
||||
if ((video->flags_ & telegram_api::documentAttributeVideo::ROUND_MESSAGE_MASK) != 0) {
|
||||
// video note without sound
|
||||
animated = nullptr;
|
||||
} else {
|
||||
// video animation
|
||||
video = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (animated != nullptr && audio != nullptr) {
|
||||
|
@ -219,7 +219,7 @@ tl_object_ptr<telegram_api::InputMedia> VideoNotesManager::get_input_media(
|
||||
telegram_api::documentAttributeVideo::ROUND_MESSAGE_MASK, false /*ignored*/, false /*ignored*/,
|
||||
video_note->duration, video_note->dimensions.width ? video_note->dimensions.width : 240,
|
||||
video_note->dimensions.height ? video_note->dimensions.height : 240));
|
||||
int32 flags = 0;
|
||||
int32 flags = telegram_api::inputMediaUploadedDocument::NOSOUND_VIDEO_MASK;
|
||||
if (input_thumbnail != nullptr) {
|
||||
flags |= telegram_api::inputMediaUploadedDocument::THUMB_MASK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user