diff --git a/td/telegram/Photo.hpp b/td/telegram/Photo.hpp index 3e655884a..0ffd0a086 100644 --- a/td/telegram/Photo.hpp +++ b/td/telegram/Photo.hpp @@ -95,7 +95,11 @@ void store(const AnimationSize &animation_size, StorerT &storer) { template void parse(AnimationSize &animation_size, ParserT &parser) { parse(static_cast(animation_size), parser); - parse(animation_size.main_frame_timestamp, parser); + if (parser.version() >= static_cast(Version::AddDialogPhotoHasAnimation)) { + parse(animation_size.main_frame_timestamp, parser); + } else { + animation_size.main_frame_timestamp = 0; + } } template diff --git a/td/telegram/Version.h b/td/telegram/Version.h index 23134f6cb..9fe2d4575 100644 --- a/td/telegram/Version.h +++ b/td/telegram/Version.h @@ -11,32 +11,32 @@ namespace td { constexpr int32 MTPROTO_LAYER = 116; enum class Version : int32 { - Initial, + Initial, // 0 StoreFileId, AddKeyHashToSecretChat, AddDurationToAnimation, FixStoreGameWithoutAnimation, - AddAccessHashToSecretChat, + AddAccessHashToSecretChat, // 5 StoreFileOwnerId, StoreFileEncryptionKey, NetStatsCountDuration, FixWebPageInstantViewDatabase, - FixMinUsers, + FixMinUsers, // 10 FixPageBlockAudioEmptyFile, AddMessageInvoiceProviderData, AddCaptionEntities, AddVenueType, - AddTermsOfService, + AddTermsOfService, // 15 AddContactVcard, AddMessageUnsupportedVersion, SupportInstantView2_0, AddNotificationGroupInfoMaxRemovedMessageId, - SupportMinithumbnails, + SupportMinithumbnails, // 20 AddVideoCallsSupport, AddPhotoSizeSource, AddFolders, SupportPolls2_0, - AddDiceEmoji, + AddDiceEmoji, // 25 AddAnimationStickers, AddDialogPhotoHasAnimation, Next