aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/Version.h
blob: 144b50e3e375dbd98fc20e8556b3592ec1ea8a8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2026
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#pragma once

#include "td/utils/common.h"

namespace td {

constexpr int32 MTPROTO_LAYER = 228;

enum class Version : int32 {
  Initial,  // 0
  StoreFileId,
  AddKeyHashToSecretChat,
  AddDurationToAnimation,
  FixStoreGameWithoutAnimation,
  AddAccessHashToSecretChat,  // 5
  StoreFileOwnerId,
  StoreFileEncryptionKey,
  NetStatsCountDuration,
  FixWebPageInstantViewDatabase,
  FixMinUsers,  // 10
  FixPageBlockAudioEmptyFile,
  AddMessageInvoiceProviderData,
  AddCaptionEntities,
  AddVenueType,
  AddTermsOfService,  // 15
  AddContactVcard,
  AddMessageUnsupportedVersion,
  SupportInstantView2_0,
  AddNotificationGroupInfoMaxRemovedMessageId,
  SupportMinithumbnails,  // 20
  AddVideoCallsSupport,
  AddPhotoSizeSource,
  AddFolders,
  SupportPolls2_0,
  AddDiceEmoji,  // 25
  AddAnimationStickers,
  AddDialogPhotoHasAnimation,
  AddPhotoProgressiveSizes,
  AddLiveLocationHeading,
  AddLiveLocationProximityAlertDistance,  // 30
  SupportBannedChannels,
  RemovePhotoVolumeAndLocalId,
  Support64BitIds,
  AddInviteLinksRequiringApproval,
  AddKeyboardButtonFlags,  // 35
  AddAudioFlags,
  UseServerForwardAsCopy,
  AddMainDialogListPosition,
  AddVoiceNoteFlags,
  AddMessageStickerFlags,  // 40
  AddStickerSetListFlags,
  AddInputInvoiceFlags,
  AddVideoNoteFlags,
  AddMessageChatSetTtlFlags,
  AddMessageMediaSpoiler,  // 45
  MakeParticipantFlags64Bit,
  AddDocumentFlags,
  AddUserFlags2,
  AddMessageTextFlags,
  AddPageBlockChatLinkFlags,  // 50
  SupportRepliesInOtherChats,
  SupportMultipleSharedUsers,
  SupportMoreEmojiGroups,
  SupportStarGiveaways,
  SupportGiftChatThemes,  // 55
  SupportBotTopics,
  AddDiceFlags,
  AddStarGiftAttributeRarity,
  AddPollCaption,
  SupportRichMessages,  // 60
  SupportEphemeralMessages,
  Next
};

enum class DbVersion : int32 {
  CreateDialogDb = 3,
  AddMessageDbMediaIndex,
  AddMessageDb30MediaIndex,
  AddMessageDbFts,
  AddMessagesCallIndex,
  FixFileRemoteLocationKeyBug,
  AddNotificationsSupport,
  AddFolders,
  AddScheduledMessages,
  StorePinnedDialogsInBinlog,
  AddMessageThreadSupport,
  AddMessageThreadDatabase,
  Next
};

inline constexpr int32 current_db_version() {
  return static_cast<int32>(DbVersion::Next) - 1;
}

}  // namespace td