-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathlimits.ts
More file actions
182 lines (176 loc) · 5.32 KB
/
Copy pathlimits.ts
File metadata and controls
182 lines (176 loc) · 5.32 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
import type { ApiAppConfig, ApiLimitType } from './api/types';
import { MULTIACCOUNT_MAX_SLOTS } from './config';
export const GROUP_CALL_PARTICIPANTS_LIMIT = 100;
export const STORY_LIST_LIMIT = 100;
export const API_GENERAL_ID_LIMIT = 100;
export const RESALE_GIFTS_LIMIT = 50;
export const PINNED_MESSAGES_LIMIT = 50;
export const BLOCKED_LIST_LIMIT = 100;
export const GLOBAL_SEARCH_CONTACTS_LIMIT = 20;
// As in Telegram for Android
// https://github.com/DrKLO/Telegram/blob/51e9947527/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java#L7799
export const TOP_REACTIONS_LIMIT = 100;
export const RECENT_REACTIONS_LIMIT = 50;
export const REACTION_LIST_LIMIT = 100;
export const DEFAULT_LIMITS: Record<ApiLimitType, readonly [number, number]> = {
uploadMaxFileparts: [4000, 8000],
stickersFaved: [5, 10],
savedGifs: [200, 400],
dialogFiltersChats: [100, 200],
dialogFilters: [10, 20],
dialogFolderPinned: [5, 10],
messageLength: [4096, 8192],
captionLength: [1024, 4096],
channels: [500, 1000],
channelsPublic: [10, 20],
aboutLength: [70, 140],
chatlistInvites: [3, 100],
chatlistJoined: [2, 20],
recommendedChannels: [10, 100],
savedDialogsPinned: [5, 100],
maxReactions: [1, 3],
moreAccounts: [3, MULTIACCOUNT_MAX_SLOTS],
aiComposeToneSaved: [5, 20],
};
export const DEFAULT_MAX_NOTE_LENGTH = 128;
export const DEFAULT_APP_CONFIG: ApiAppConfig = {
hash: 0,
limits: {
uploadMaxFileparts: DEFAULT_LIMITS.uploadMaxFileparts,
stickersFaved: DEFAULT_LIMITS.stickersFaved,
savedGifs: DEFAULT_LIMITS.savedGifs,
dialogFiltersChats: DEFAULT_LIMITS.dialogFiltersChats,
dialogFilters: DEFAULT_LIMITS.dialogFilters,
dialogFolderPinned: DEFAULT_LIMITS.dialogFolderPinned,
messageLength: DEFAULT_LIMITS.messageLength,
captionLength: DEFAULT_LIMITS.captionLength,
channels: DEFAULT_LIMITS.channels,
channelsPublic: DEFAULT_LIMITS.channelsPublic,
aboutLength: DEFAULT_LIMITS.aboutLength,
chatlistInvites: DEFAULT_LIMITS.chatlistInvites,
chatlistJoined: DEFAULT_LIMITS.chatlistJoined,
recommendedChannels: DEFAULT_LIMITS.recommendedChannels,
savedDialogsPinned: DEFAULT_LIMITS.savedDialogsPinned,
moreAccounts: DEFAULT_LIMITS.moreAccounts,
maxReactions: DEFAULT_LIMITS.maxReactions,
aiComposeToneSaved: DEFAULT_LIMITS.aiComposeToneSaved,
},
richMessageLengthLimit: 32768,
richMessageMaxBlocks: 500,
richMessageMaxDepth: 16,
richMessageMaxMedia: 50,
richMessageMaxTableColumns: 20,
autologinDomains: [
'instantview.telegram.org',
'translations.telegram.org',
'contest.dev',
'contest.com',
'bugs.telegram.org',
'suggestions.telegram.org',
'themes.telegram.org',
'promote.telegram.org',
'ads.telegram.org',
],
channelLevelMax: 100,
boostsPerSentGift: 3,
channelRestrictAdsLevelMin: 50,
seenByExpiresAt: 604800,
seenByMaxChatMembers: 100,
defaultEmojiStatusesStickerSetId: '773947703670341676',
emojiSounds: {},
giveawayAddPeersMax: 10,
giveawayBoostsPerPremium: 4,
giveawayCountriesMax: 10,
isGiveawayGiftsPurchaseAvailable: false,
groupTranscribeLevelMin: 6,
hiddenMembersMinCount: 100,
ignoreRestrictionReasons: [],
canLimitNewMessagesWithoutPremium: false,
readDateExpiresAt: 604800,
premiumBotUsername: 'PremiumBot',
premiumPromoOrder: [
'stories',
'more_upload',
'double_limits',
// 'business',
'last_seen',
'voice_to_text',
'faster_download',
'translations',
'animated_emoji',
'emoji_status',
'saved_tags',
// 'peer_colors',
// 'wallpapers',
'profile_badge',
'message_privacy',
'advanced_chat_management',
'no_ads',
// 'app_icons',
'infinite_reactions',
'animated_userpics',
'premium_stickers',
'effects',
'pm_noforwards',
],
isPremiumPurchaseBlocked: false,
maxUniqueReactions: 11,
starGiftMaxConvertPeriod: 7776000,
starGiftMaxMessageLength: 255,
starRefStartPrefixes: [
'_tgr_',
],
isStarsGiftEnabled: true,
paidReactionMaxAmount: 2500,
starsUsdWithdrawRateX1000: 1300,
storyChangelogUserId: '777000',
maxPinnedStoriesCount: 3,
starsSuggestedPostAmountMax: 100000,
starsSuggestedPostAmountMin: 5,
starsSuggestedPostAgeMin: 86400,
starsSuggestedPostFutureMin: 300,
starsSuggestedPostFutureMax: 2678400,
starsSuggestedPostCommissionPermille: 850,
pollMaxAnswers: 12,
pollClosePeriodMax: 2628000,
pollCountriesMax: 10,
noForwardsRequestExpirePeriod: 86400,
tonSuggestedPostCommissionPermille: 850,
todoItemLengthMax: 64,
todoItemsMax: 30,
todoTitleLengthMax: 32,
tonSuggestedPostAmountMax: 10000000000000,
tonSuggestedPostAmountMin: 10000000,
tonTopupUrl: 'https://fragment.com/ads/topup',
storyViewersExpirePeriod: 86400,
topicsPinnedLimit: 5,
bandwidthPremiumDownloadSpeedup: 10,
bandwidthPremiumNotifyPeriod: 3600,
bandwidthPremiumUploadSpeedup: 10,
urlAuthDomains: [
'web.telegram.org',
'web.t.me',
'k.t.me',
'z.t.me',
'a.t.me',
],
webAppAllowedProtocols: [
'http',
'https',
],
whitelistedDomains: [
'telegram.dog',
'telegram.me',
'telegram.org',
't.me',
'telesco.pe',
'fragment.com',
'translations.telegram.org',
],
typingDraftTtl: 10,
isMessagePrimaryEditedDateEnabled: false,
arePasskeysAvailable: true,
passkeysMaxCount: 5,
diceEmojies: [],
diceEmojiesSuccess: {},
};