2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Use DocumentData::getDuration for all types.

This commit is contained in:
John Preston
2019-03-06 12:21:42 +04:00
parent 41c60419f1
commit 01d763eed1
11 changed files with 27 additions and 41 deletions

View File

@@ -108,7 +108,7 @@ MTPVector<MTPDocumentAttribute> ComposeSendingDocumentAttributes(
const auto dimensions = document->dimensions;
auto attributes = QVector<MTPDocumentAttribute>(1, filenameAttribute);
if (dimensions.width() > 0 && dimensions.height() > 0) {
const auto duration = document->duration();
const auto duration = document->getDuration();
if (duration >= 0) {
auto flags = MTPDdocumentAttributeVideo::Flags(0);
if (document->isVideoMessage()) {