Premium avatar badges; Support "addemoji" deeplink; Premium Modal redesign; More web bot features (#1961)

This commit is contained in:
Alexander Zinchuk 2022-08-31 15:00:34 +02:00
parent 358d59ff53
commit 47c0bc206f
38 changed files with 481 additions and 140 deletions

View File

@ -73,6 +73,7 @@ export function buildAppConfig(json: GramJs.TypeJSONValue): ApiAppConfig {
urlAuthDomains: appConfig.url_auth_domains || [],
premiumBotUsername: appConfig.premium_bot_username,
premiumInvoiceSlug: appConfig.premium_invoice_slug,
premiumPromoOrder: appConfig.premium_promo_order,
isPremiumPurchaseBlocked: appConfig.premium_purchase_blocked,
limits: {
uploadMaxFileparts: getLimit(appConfig, 'upload_max_fileparts', 'uploadMaxFileparts'),

View File

@ -106,12 +106,14 @@ export function buildStickerSet(set: GramJs.StickerSet): ApiStickerSet {
thumbs,
count,
shortName,
emojis,
} = set;
return {
archived,
isLottie: animated,
isVideos: videos,
isEmoji: emojis,
installedDate,
id: String(id),
accessHash: String(accessHash),
@ -125,9 +127,9 @@ export function buildStickerSet(set: GramJs.StickerSet): ApiStickerSet {
export function buildStickerSetCovered(coveredStickerSet: GramJs.TypeStickerSetCovered): ApiStickerSet {
const stickerSet = buildStickerSet(coveredStickerSet.set);
const stickerSetCovers = (coveredStickerSet instanceof GramJs.StickerSetMultiCovered)
? coveredStickerSet.covers
: [coveredStickerSet.cover];
const stickerSetCovers = (coveredStickerSet instanceof GramJs.StickerSetCovered) ? [coveredStickerSet.cover]
: (coveredStickerSet instanceof GramJs.StickerSetMultiCovered) ? coveredStickerSet.covers
: coveredStickerSet.documents;
stickerSet.covers = [];
stickerSetCovers.forEach((cover) => {

View File

@ -1,5 +1,6 @@
import { Api as GramJs } from '../../../lib/gramjs';
import type {
ApiPremiumGiftOption,
ApiUser, ApiUserStatus, ApiUserType,
} from '../../types';
import { buildApiPeerId } from './peers';
@ -10,7 +11,7 @@ export function buildApiUserFromFull(mtpUserFull: GramJs.users.UserFull): ApiUse
const {
fullUser: {
about, commonChatsCount, pinnedMsgId, botInfo, blocked,
profilePhoto,
profilePhoto, voiceMessagesForbidden, premiumGifts,
},
users,
} = mtpUserFull;
@ -25,6 +26,8 @@ export function buildApiUserFromFull(mtpUserFull: GramJs.users.UserFull): ApiUse
commonChatsCount,
pinnedMessageId: pinnedMsgId,
isBlocked: Boolean(blocked),
noVoiceMessages: voiceMessagesForbidden,
...(premiumGifts && { premiumGifts: premiumGifts.map((gift) => buildApiPremiumGiftOption(gift)) }),
...(botInfo && { botInfo: buildApiBotInfo(botInfo, user.id) }),
},
};
@ -115,3 +118,16 @@ export function buildApiUsersAndStatuses(mtpUsers: GramJs.TypeUser[]) {
return { users, userStatusesById };
}
export function buildApiPremiumGiftOption(option: GramJs.TypePremiumGiftOption): ApiPremiumGiftOption {
const {
months, currency, amount, botUrl,
} = option;
return {
months,
currency,
amount: amount.toJSNumber(),
botUrl,
};
}

View File

@ -48,6 +48,7 @@ export interface ApiStickerSet {
archived?: true;
isLottie?: true;
isVideos?: true;
isEmoji?: true;
installedDate?: number;
id: string;
accessHash: string;

View File

@ -170,6 +170,7 @@ export interface ApiAppConfig {
premiumInvoiceSlug: string;
premiumBotUsername: string;
isPremiumPurchaseBlocked: boolean;
premiumPromoOrder: string[];
limits: Record<ApiLimitType, readonly [number, number]>;
}

View File

@ -39,6 +39,8 @@ export interface ApiUserFullInfo {
pinnedMessageId?: number;
botInfo?: ApiBotInfo;
profilePhoto?: ApiPhoto;
noVoiceMessages?: boolean;
premiumGifts?: ApiPremiumGiftOption[];
}
export type ApiFakeType = 'fake' | 'scam';
@ -68,3 +70,10 @@ export interface ApiAttachMenuBotIcon {
name: string;
document: ApiDocument;
}
export interface ApiPremiumGiftOption {
months: number;
currency: string;
amount: number;
botUrl: string;
}

View File

@ -1,5 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="32" height="32" rx="10" fill="#B24CB5"/>
<rect x="7.30762" y="8.41418" width="2" height="24" rx="1" transform="rotate(-45 7.30762 8.41418)" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.6342 19.5007H11C8.79086 19.5007 7 17.7098 7 15.5007C7 14.2442 7.57935 13.123 8.48549 12.3897L17.6842 21.5883L16.0781 20.3391C15.8157 20.1351 15.6845 20.033 15.5464 19.9478C15.1662 19.7131 14.7384 19.5663 14.2941 19.5181C14.1329 19.5007 13.9667 19.5007 13.6342 19.5007ZM23.0425 24.1182L10.4609 11.5367C10.6372 11.5129 10.8172 11.5007 11 11.5007H13.6342C13.9667 11.5007 14.1329 11.5007 14.2941 11.4832C14.7384 11.435 15.1662 11.2882 15.5464 11.0535C15.6845 10.9683 15.8157 10.8663 16.0781 10.6622L18.8354 8.51757L18.8354 8.51757L18.8354 8.51756C20.4927 7.22858 21.3213 6.58409 22.017 6.59001C22.6222 6.59516 23.1926 6.8741 23.5682 7.34866C24 7.89419 24 8.94396 24 11.0435V19.9578C24 22.0573 24 23.1071 23.5682 23.6526C23.42 23.8399 23.2415 23.9967 23.0425 24.1182ZM11 22.3869C11 21.8675 11 21.6077 11.0941 21.4064C11.1934 21.1941 11.3641 21.0234 11.5764 20.9241C11.7778 20.83 12.0375 20.83 12.5569 20.83H13.4431C13.9625 20.83 14.2222 20.83 14.4236 20.9241C14.6359 21.0234 14.8066 21.1941 14.9059 21.4064C15 21.6077 15 21.8675 15 22.3869V23.5007C15 24.6052 14.1046 25.5007 13 25.5007C11.8954 25.5007 11 24.6052 11 23.5007V22.3869Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,4 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 16C0 10.3995 0 7.59921 1.08993 5.46009C2.04867 3.57847 3.57847 2.04867 5.46009 1.08993C7.59921 0 10.3995 0 16 0C21.6005 0 24.4008 0 26.5399 1.08993C28.4215 2.04867 29.9513 3.57847 30.9101 5.46009C32 7.59921 32 10.3995 32 16C32 21.6005 32 24.4008 30.9101 26.5399C29.9513 28.4215 28.4215 29.9513 26.5399 30.9101C24.4008 32 21.6005 32 16 32C10.3995 32 7.59921 32 5.46009 30.9101C3.57847 29.9513 2.04867 28.4215 1.08993 26.5399C0 24.4008 0 21.6005 0 16Z" fill="#5A6EEE"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.4014 22.7046L10.3894 25.775C9.8683 26.0942 9.18701 25.9306 8.86775 25.4094C8.71182 25.1549 8.66533 24.8482 8.73884 24.5589L9.51469 21.5051C9.79476 20.4027 10.5491 19.4812 11.5744 18.989L17.0422 16.3638C17.2972 16.2414 17.4046 15.9355 17.2822 15.6806C17.1831 15.4742 16.9589 15.3587 16.7333 15.3977L10.6469 16.4514C9.40971 16.6656 8.14095 16.324 7.17858 15.5175L5.25584 13.9062C4.78741 13.5136 4.72591 12.8156 5.11846 12.3472C5.30939 12.1194 5.58394 11.978 5.88029 11.9548L11.7548 11.495C12.1698 11.4625 12.5315 11.1999 12.6908 10.8153L14.9571 5.34464C15.191 4.78 15.8384 4.51189 16.403 4.7458C16.6741 4.85811 16.8895 5.07352 17.0019 5.34464L19.2681 10.8153C19.4275 11.1999 19.7891 11.4625 20.2042 11.495L26.111 11.9573C26.7203 12.005 27.1756 12.5376 27.1279 13.1469C27.1049 13.44 26.9663 13.7119 26.7426 13.9027L22.2377 17.7432C21.9206 18.0135 21.7822 18.4391 21.8797 18.8443L23.2647 24.5976C23.4077 25.1918 23.042 25.7894 22.4478 25.9325C22.1623 26.0012 21.8611 25.9536 21.6107 25.8002L16.5576 22.7046C16.2028 22.4873 15.7562 22.4873 15.4014 22.7046Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,4 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 16C0 10.3995 0 7.59921 1.08993 5.46009C2.04867 3.57847 3.57847 2.04867 5.46009 1.08993C7.59921 0 10.3995 0 16 0C21.6005 0 24.4008 0 26.5399 1.08993C28.4215 2.04867 29.9513 3.57847 30.9101 5.46009C32 7.59921 32 10.3995 32 16C32 21.6005 32 24.4008 30.9101 26.5399C29.9513 28.4215 28.4215 29.9513 26.5399 30.9101C24.4008 32 21.6005 32 16 32C10.3995 32 7.59921 32 5.46009 30.9101C3.57847 29.9513 2.04867 28.4215 1.08993 26.5399C0 24.4008 0 21.6005 0 16Z" fill="#7561EB"/>
<path d="M6 23.1373V13.4C6 11.1598 6 10.0397 6.43597 9.18404C6.81947 8.43139 7.43139 7.81947 8.18404 7.43597C9.03969 7 10.1598 7 12.4 7H19.6C21.8402 7 22.9603 7 23.816 7.43597C24.5686 7.81947 25.1805 8.43139 25.564 9.18404C26 10.0397 26 11.1598 26 13.4V15.6C26 17.8402 26 18.9603 25.564 19.816C25.1805 20.5686 24.5686 21.1805 23.816 21.564C22.9603 22 21.8402 22 19.6 22H12.3255C11.8363 22 11.5917 22 11.3615 22.0553C11.1575 22.1043 10.9624 22.1851 10.7834 22.2947C10.5816 22.4184 10.4086 22.5914 10.0627 22.9373L8.73137 24.2686C7.87462 25.1254 7.44624 25.5538 7.07846 25.5827C6.75934 25.6078 6.44749 25.4786 6.23959 25.2352C6 24.9547 6 24.3489 6 23.1373Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 774 B

View File

@ -0,0 +1,3 @@
<svg width="32" height="33" viewBox="0 0 32 33" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9999 26.1C21.3018 26.1 25.5999 21.802 25.5999 16.5C25.5999 11.1981 21.3018 6.90002 15.9999 6.90002C10.698 6.90002 6.3999 11.1981 6.3999 16.5C6.3999 21.802 10.698 26.1 15.9999 26.1ZM13.1208 14.6993C13.7164 14.6993 14.2007 14.2157 14.2007 13.6194C14.2007 13.0238 13.7167 12.5397 13.1208 12.5395C12.5241 12.5395 12.0409 13.0238 12.0409 13.6194C12.0409 14.2154 12.5241 14.6993 13.1208 14.6993ZM19.9607 13.6194C19.9607 14.2157 19.4764 14.6993 18.8808 14.6993C18.2839 14.6993 17.8009 14.2154 17.8009 13.6194C17.8009 13.0238 18.2841 12.5395 18.8808 12.5395C19.4764 12.5397 19.9607 13.0238 19.9607 13.6194ZM21.8698 17.1054C22.1434 17.0415 22.6904 16.9928 22.74 17.439L22.7402 17.439C22.783 17.8154 22.2661 19.2887 22.0914 19.6452C21.0193 21.8347 18.6955 23.2221 16.0017 23.2221C15.4689 23.2221 14.9355 23.1697 14.4131 23.0636C13.3228 22.8394 12.2781 22.3689 11.4203 21.6533C10.6396 21.002 10.0283 20.1505 9.67166 19.1976C9.48303 18.695 9.39646 18.2532 9.34121 17.72C9.31464 17.465 9.33892 17.1772 9.63893 17.1467C9.7801 17.1323 9.92136 17.1707 10.06 17.2085C10.1157 17.2237 10.171 17.2387 10.2257 17.2502C10.4242 17.2917 10.6224 17.3311 10.8231 17.363C11.3245 17.4413 11.831 17.4865 12.3376 17.5317C12.3887 17.5363 12.4399 17.5408 12.4911 17.5454C13.6579 17.6491 14.8305 17.6991 16.0016 17.6991C16.5239 17.6991 17.0462 17.6848 17.5679 17.6559C18.6284 17.5988 19.6882 17.492 20.7368 17.3232C21.1161 17.2618 21.4948 17.1925 21.8698 17.1054ZM21.6505 17.8205C20.3244 18.0546 17.9926 18.4191 16.0018 18.4191L16.0019 18.4192C14.1596 18.4192 11.6437 18.2313 10.2423 18.0264C10.0975 18.0053 10.0745 18.371 10.1607 18.4895C10.5945 19.0859 13.1112 20.0596 16 20.0596C18.9513 20.0596 21.3322 18.8914 21.8001 18.2789C21.8886 18.1635 21.7934 17.7947 21.6505 17.8205Z" fill="white" />
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,4 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 16C0 10.3995 0 7.59921 1.08993 5.46009C2.04867 3.57847 3.57847 2.04867 5.46009 1.08993C7.59921 0 10.3995 0 16 0C21.6005 0 24.4008 0 26.5399 1.08993C28.4215 2.04867 29.9513 3.57847 30.9101 5.46009C32 7.59921 32 10.3995 32 16C32 21.6005 32 24.4008 30.9101 26.5399C29.9513 28.4215 28.4215 29.9513 26.5399 30.9101C24.4008 32 21.6005 32 16 32C10.3995 32 7.59921 32 5.46009 30.9101C3.57847 29.9513 2.04867 28.4215 1.08993 26.5399C0 24.4008 0 21.6005 0 16Z" fill="#E36850"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.152 6.40001C13.6611 6.40001 13.9986 6.40049 14.259 6.41826C14.5114 6.43548 14.6261 6.46595 14.6963 6.49501C15.0021 6.62168 15.245 6.86463 15.3717 7.17043C15.4008 7.24059 15.4312 7.35525 15.4484 7.60768C15.4662 7.86806 15.4667 8.20556 15.4667 8.71468V11.168V11.2033C15.4667 11.7706 15.4667 12.2492 15.4987 12.6413C15.5322 13.0518 15.6052 13.4447 15.7957 13.8185C16.0851 14.3865 16.5469 14.8483 17.1149 15.1377C17.4887 15.3281 17.8816 15.4011 18.2921 15.4347C18.6841 15.4667 19.1627 15.4667 19.73 15.4667H19.7654H22.2187C22.7278 15.4667 23.0653 15.4672 23.3257 15.4849C23.5781 15.5021 23.6928 15.5326 23.7629 15.5617C24.0687 15.6883 24.3117 15.9313 24.4384 16.2371C24.4674 16.3073 24.4979 16.4219 24.5151 16.6743C24.5319 16.92 24.5332 17.2343 24.5333 17.6966V20.48C24.5333 22.2722 24.5333 23.1682 24.1846 23.8528C23.8778 24.4549 23.3882 24.9444 22.7861 25.2512C22.1016 25.6 21.2055 25.6 19.4133 25.6H12.5867C10.7945 25.6 9.89842 25.6 9.21391 25.2512C8.61179 24.9444 8.12225 24.4549 7.81545 23.8528C7.46667 23.1682 7.46667 22.2722 7.46667 20.48V11.52C7.46667 9.72783 7.46667 8.83174 7.81545 8.14722C8.12225 7.54511 8.61179 7.05557 9.21391 6.74877C9.89842 6.39999 10.7945 6.39999 12.5867 6.39999H13.152V6.40001ZM24.1292 13.8214C24.0622 13.6787 23.9872 13.5395 23.9046 13.4046C23.6408 12.9741 23.2718 12.6051 22.5339 11.8672L22.5339 11.8672L22.5339 11.8672L19.0662 8.39948L19.0662 8.39947L19.0662 8.39947C18.3282 7.66155 17.9593 7.29259 17.5287 7.02873C17.3938 6.94609 17.2547 6.87114 17.1119 6.80414C17.1705 7.02692 17.1991 7.25409 17.215 7.48715C17.2374 7.81501 17.2374 8.21331 17.2374 8.68534V8.68538V8.71468V11.168C17.2374 11.78 17.238 12.1858 17.2635 12.4971C17.2881 12.7981 17.3313 12.932 17.3734 13.0146C17.493 13.2494 17.6839 13.4403 17.9188 13.56C18.0013 13.6021 18.1353 13.6453 18.4363 13.6699C18.7476 13.6953 19.1534 13.696 19.7654 13.696H22.2187H22.248H22.248C22.7201 13.696 23.1184 13.696 23.4462 13.7184C23.6793 13.7343 23.9064 13.7628 24.1292 13.8214Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,4 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 16C0 10.3995 0 7.59921 1.08993 5.46009C2.04867 3.57847 3.57847 2.04867 5.46009 1.08993C7.59921 0 10.3995 0 16 0C21.6005 0 24.4008 0 26.5399 1.08993C28.4215 2.04867 29.9513 3.57847 30.9101 5.46009C32 7.59921 32 10.3995 32 16C32 21.6005 32 24.4008 30.9101 26.5399C29.9513 28.4215 28.4215 29.9513 26.5399 30.9101C24.4008 32 21.6005 32 16 32C10.3995 32 7.59921 32 5.46009 30.9101C3.57847 29.9513 2.04867 28.4215 1.08993 26.5399C0 24.4008 0 21.6005 0 16Z" fill="#F27C30"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.96766 9.73466C6.48238 9.34861 7.21261 9.45293 7.59866 9.96766L10.6667 14.0583L13.7347 9.96766C14.1207 9.45293 14.8509 9.34861 15.3657 9.73466C15.8804 10.1207 15.9847 10.8509 15.5987 11.3657L12.1229 16L15.5987 20.6343C15.9847 21.1491 15.8804 21.8793 15.3657 22.2653C14.8509 22.6514 14.1207 22.5471 13.7347 22.0323L10.6667 17.9417L7.59866 22.0323C7.21261 22.5471 6.48238 22.6514 5.96766 22.2653C5.45293 21.8793 5.34861 21.1491 5.73466 20.6343L9.21041 16L5.73466 11.3657C5.34861 10.8509 5.45293 10.1207 5.96766 9.73466ZM20.6667 9.50166C18.9187 9.50166 17.5017 10.9187 17.5017 12.6667V13.3333C17.5017 13.9767 18.0232 14.4983 18.6667 14.4983C19.3101 14.4983 19.8317 13.9767 19.8317 13.3333V12.6667C19.8317 12.2055 20.2055 11.8317 20.6667 11.8317H22.4492C23.3986 11.8317 24.1683 12.6013 24.1683 13.5508C24.1683 14.202 23.8004 14.7973 23.218 15.0885L19.6198 16.8876C18.3216 17.5367 17.5017 18.8634 17.5017 20.3147V21.3333C17.5017 21.9767 18.0232 22.4983 18.6667 22.4983L25.3333 22.4983C25.9767 22.4983 26.4983 21.9767 26.4983 21.3333C26.4983 20.6899 25.9767 20.1683 25.3333 20.1683L19.8388 20.1683C19.8887 19.658 20.197 19.204 20.6618 18.9716L24.26 17.1725C25.6318 16.4866 26.4983 15.0845 26.4983 13.5508C26.4983 11.3145 24.6855 9.50166 22.4492 9.50166H20.6667Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,4 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 16C0 10.3995 0 7.59921 1.08993 5.46009C2.04867 3.57847 3.57847 2.04867 5.46009 1.08993C7.59921 0 10.3995 0 16 0C21.6005 0 24.4008 0 26.5399 1.08993C28.4215 2.04867 29.9513 3.57847 30.9101 5.46009C32 7.59921 32 10.3995 32 16C32 21.6005 32 24.4008 30.9101 26.5399C29.9513 28.4215 28.4215 29.9513 26.5399 30.9101C24.4008 32 21.6005 32 16 32C10.3995 32 7.59921 32 5.46009 30.9101C3.57847 29.9513 2.04867 28.4215 1.08993 26.5399C0 24.4008 0 21.6005 0 16Z" fill="#A34ED0"/>
<path d="M16 25.2504C16.2472 25.2504 16.5988 25.0698 16.884 24.8892C22.1973 21.4675 25.6 17.4564 25.6 13.3883C25.6 9.89994 23.1953 7.46667 20.1632 7.46667C18.2717 7.46667 16.8555 8.51222 16 10.0805C15.1636 8.52172 13.7378 7.46667 11.8464 7.46667C8.81428 7.46667 6.40002 9.89994 6.40002 13.3883C6.40002 17.4564 9.8028 21.4675 15.1161 24.8892C15.4107 25.0698 15.7624 25.2504 16 25.2504Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 984 B

After

Width:  |  Height:  |  Size: 504 B

View File

@ -1,4 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 16C0 10.3995 0 7.59921 1.08993 5.46009C2.04867 3.57847 3.57847 2.04867 5.46009 1.08993C7.59921 0 10.3995 0 16 0C21.6005 0 24.4008 0 26.5399 1.08993C28.4215 2.04867 29.9513 3.57847 30.9101 5.46009C32 7.59921 32 10.3995 32 16C32 21.6005 32 24.4008 30.9101 26.5399C29.9513 28.4215 28.4215 29.9513 26.5399 30.9101C24.4008 32 21.6005 32 16 32C10.3995 32 7.59921 32 5.46009 30.9101C3.57847 29.9513 2.04867 28.4215 1.08993 26.5399C0 24.4008 0 21.6005 0 16Z" fill="#D15078"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.9431 21.6456C27.4332 21.6857 27.7374 21.2341 27.7374 20.5076C27.7374 18.239 27.1709 16.0675 26.1648 14.1834L23.6474 17.0423C23.9605 18.1516 24.1212 19.3489 24.1212 20.5854C24.1212 21.3118 24.453 21.6055 25.9431 21.6456ZM22.9008 10.2546C20.9911 8.75039 18.6244 7.84753 16.002 7.84753C9.29914 7.84753 4.2666 13.7335 4.2666 20.4949C4.2666 21.5779 4.65406 21.6438 5.30003 21.6478H5.54718C6.18185 21.6438 6.47326 21.5779 6.47326 20.4949C6.47326 15.1864 10.6338 10.6908 15.8964 10.6908C17.6083 10.6908 19.0768 11.1761 20.2791 12.0137L22.9008 10.2546ZM18.5812 15.961C18.9954 16.1768 19.331 16.4439 19.5877 16.7621C19.8433 17.0787 20.0582 17.4421 20.2324 17.8522C20.3191 18.0561 20.5547 18.1512 20.7586 18.0645C20.8101 18.0426 20.8565 18.0102 20.8934 17.9682L28.4039 9.92015C28.7063 9.59615 28.6888 9.08839 28.3648 8.78603C28.0813 8.52151 27.6493 8.49748 27.3382 8.72895L18.529 15.2847C18.3498 15.415 18.3126 15.6663 18.4446 15.8443C18.4807 15.893 18.5274 15.9329 18.5812 15.961ZM16.1059 22.4C17.7582 22.4 19.0976 21.041 19.0976 19.3646C19.0976 17.6882 17.7582 16.3292 16.1059 16.3292C14.4537 16.3292 13.1143 17.6882 13.1143 19.3646C13.1143 21.041 14.4537 22.4 16.1059 22.4Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,4 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 16C0 10.3995 0 7.59921 1.08993 5.46009C2.04867 3.57847 3.57847 2.04867 5.46009 1.08993C7.59921 0 10.3995 0 16 0C21.6005 0 24.4008 0 26.5399 1.08993C28.4215 2.04867 29.9513 3.57847 30.9101 5.46009C32 7.59921 32 10.3995 32 16C32 21.6005 32 24.4008 30.9101 26.5399C29.9513 28.4215 28.4215 29.9513 26.5399 30.9101C24.4008 32 21.6005 32 16 32C10.3995 32 7.59921 32 5.46009 30.9101C3.57847 29.9513 2.04867 28.4215 1.08993 26.5399C0 24.4008 0 21.6005 0 16Z" fill="#9054E9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.86506 8.72963C6.40002 9.64232 6.40002 10.8371 6.40002 13.2267V19.6923C6.40002 21.2192 6.40002 21.9827 6.59322 22.6027C7.01037 23.9414 8.05865 24.9896 9.39734 25.4068C10.0173 25.6 10.7808 25.6 12.3077 25.6C14.0084 25.6 15.2881 25.6 16.3162 25.5473C16.4183 25.5304 16.4887 25.5096 16.5449 25.4863C16.8939 25.3417 17.1711 25.0645 17.3156 24.7156C17.3546 24.6215 17.3873 24.4841 17.4053 24.217C17.4236 23.9443 17.424 23.5926 17.424 23.077V23.05V23.05C17.424 22.3782 17.424 21.8221 17.4467 21.3581C16.9898 21.4601 16.5066 21.5093 16 21.5093C14.4712 21.5093 13.2611 20.8973 12.4495 20.307C12.0423 20.0109 11.7275 19.7148 11.5129 19.4908C11.4053 19.3785 11.322 19.2834 11.264 19.2143C11.2349 19.1798 11.2122 19.1516 11.1958 19.1309L11.176 19.1056L11.1697 19.0974L11.1675 19.0944L11.1666 19.0933L11.1662 19.0927C11.166 19.0925 11.1659 19.0923 11.7333 18.6667L12.3008 18.2411L12.3005 18.2406C12.3006 18.2409 12.3008 18.2411 11.7333 18.6667L11.1659 19.0923C10.9308 18.7789 10.9943 18.3343 11.3077 18.0992C11.621 17.8643 12.0652 17.9276 12.3004 18.2405L12.3002 18.2403L12.3 18.24L12.3081 18.2503C12.3165 18.2609 12.3307 18.2786 12.3506 18.3023C12.3905 18.3499 12.4531 18.4215 12.5371 18.5092C12.7058 18.6852 12.9577 18.9225 13.2839 19.1597C13.9389 19.636 14.8621 20.0907 16 20.0907C16.6721 20.0907 17.2491 19.9849 17.7424 19.7882C17.7483 19.7744 17.7542 19.7607 17.7603 19.747C18.1535 18.8615 18.8615 18.1535 19.747 17.7603C20.1643 17.5751 20.6139 17.4973 21.1323 17.4602C21.6389 17.424 22.2655 17.424 23.05 17.424H23.05H23.077C23.5926 17.424 23.9443 17.4236 24.217 17.4053C24.4841 17.3873 24.6215 17.3546 24.7156 17.3156C25.0645 17.1711 25.3417 16.8939 25.4863 16.5449C25.5096 16.4887 25.5305 16.4181 25.5473 16.3159C25.6 15.2879 25.6 14.0082 25.6 12.3077C25.6 10.7808 25.6 10.0173 25.4068 9.39731C24.9897 8.05862 23.9414 7.01034 22.6027 6.59319C21.9827 6.39999 21.2193 6.39999 19.6923 6.39999H13.2267C10.8371 6.39999 9.64236 6.39999 8.72967 6.86503C7.92684 7.27409 7.27412 7.92681 6.86506 8.72963ZM25.229 18.6383C24.94 18.7529 24.6378 18.7989 24.3121 18.8208C23.9862 18.8427 23.5867 18.8427 23.1012 18.8427H23.077C22.2594 18.8427 21.6835 18.8431 21.2335 18.8753C20.7896 18.907 20.5255 18.9669 20.3227 19.0569C19.7585 19.3074 19.3074 19.7585 19.0569 20.3227C18.9669 20.5255 18.907 20.7896 18.8753 21.2335C18.8431 21.6835 18.8427 22.2594 18.8427 23.077V23.1012C18.8427 23.5867 18.8427 23.9862 18.8208 24.3121C18.7989 24.6378 18.7529 24.9399 18.6383 25.2289C18.7118 25.2088 18.7844 25.1877 18.8561 25.1653C21.8681 24.2267 24.2267 21.8681 25.1653 18.856C25.1877 18.7844 25.2089 18.7118 25.229 18.6383ZM14.4 13.6667C14.4 14.5871 13.803 15.3333 13.0667 15.3333C12.3303 15.3333 11.7333 14.5871 11.7333 13.6667C11.7333 12.7462 12.3303 12 13.0667 12C13.803 12 14.4 12.7462 14.4 13.6667ZM20.2667 13.6667C20.2667 14.5871 19.6697 15.3333 18.9333 15.3333C18.1969 15.3333 17.6 14.5871 17.6 13.6667C17.6 12.7462 18.1969 12 18.9333 12C19.6697 12 20.2667 12.7462 20.2667 13.6667Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -1,4 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 16C0 10.3995 0 7.59921 1.08993 5.46009C2.04867 3.57847 3.57847 2.04867 5.46009 1.08993C7.59921 0 10.3995 0 16 0C21.6005 0 24.4008 0 26.5399 1.08993C28.4215 2.04867 29.9513 3.57847 30.9101 5.46009C32 7.59921 32 10.3995 32 16C32 21.6005 32 24.4008 30.9101 26.5399C29.9513 28.4215 28.4215 29.9513 26.5399 30.9101C24.4008 32 21.6005 32 16 32C10.3995 32 7.59921 32 5.46009 30.9101C3.57847 29.9513 2.04867 28.4215 1.08993 26.5399C0 24.4008 0 21.6005 0 16Z" fill="#547AFF"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 27C22.0751 27 27 22.0751 27 16C27 9.92487 22.0751 5 16 5C9.92487 5 5 9.92487 5 16C5 22.0751 9.92487 27 16 27ZM21.2687 16.8875L14.3583 21.4944C13.6495 21.967 12.7 21.4589 12.7 20.6069V11.3931C12.7 10.5411 13.6495 10.033 14.3583 10.5056L21.2687 15.1125C21.902 15.5347 21.902 16.4653 21.2687 16.8875Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 950 B

After

Width:  |  Height:  |  Size: 470 B

View File

@ -1,4 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 16C0 10.3995 0 7.59921 1.08993 5.46009C2.04867 3.57847 3.57847 2.04867 5.46009 1.08993C7.59921 0 10.3995 0 16 0C21.6005 0 24.4008 0 26.5399 1.08993C28.4215 2.04867 29.9513 3.57847 30.9101 5.46009C32 7.59921 32 10.3995 32 16C32 21.6005 32 24.4008 30.9101 26.5399C29.9513 28.4215 28.4215 29.9513 26.5399 30.9101C24.4008 32 21.6005 32 16 32C10.3995 32 7.59921 32 5.46009 30.9101C3.57847 29.9513 2.04867 28.4215 1.08993 26.5399C0 24.4008 0 21.6005 0 16Z" fill="#C14998"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 6C13.7909 6 12 7.79086 12 10V15C12 17.2091 13.7909 19 16 19C18.2091 19 20 17.2091 20 15V10C20 7.79086 18.2091 6 16 6ZM8.5 14C9.05228 14 9.5 14.4477 9.5 15C9.5 18.5899 12.4101 21.5 16 21.5C19.5899 21.5 22.5 18.5899 22.5 15C22.5 14.4477 22.9477 14 23.5 14C24.0523 14 24.5 14.4477 24.5 15C24.5 19.3561 21.2232 22.9469 17 23.4418V25.5C17 26.0523 16.5523 26.5 16 26.5C15.4477 26.5 15 26.0523 15 25.5V23.4418C10.7768 22.9469 7.5 19.3561 7.5 15C7.5 14.4477 7.94772 14 8.5 14Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 641 B

View File

@ -14,12 +14,14 @@ const store: Record<string, boolean> = {};
type OwnProps = {
withGradient?: boolean;
big?: boolean;
className?: string;
onClick?: VoidFunction;
};
const PremiumIcon: FC<OwnProps> = ({
withGradient,
big,
className,
onClick,
}) => {
const html = useMemo(() => {
@ -29,7 +31,9 @@ const PremiumIcon: FC<OwnProps> = ({
return (
<i
onClick={onClick}
className={buildClassName('PremiumIcon', withGradient && 'gradient', onClick && 'clickable', big && 'big')}
className={buildClassName(
'PremiumIcon', className, withGradient && 'gradient', onClick && 'clickable', big && 'big',
)}
dangerouslySetInnerHTML={html}
title="Premium"
/>

View File

@ -145,7 +145,7 @@ const StickerButton = <T extends number | ApiSticker | ApiBotInlineMediaResult |
const handleClick = () => {
if (isContextMenuOpen) return;
if (isLocked) {
openPremiumModal({ initialSection: 'stickers' });
openPremiumModal({ initialSection: 'premium_stickers' });
return;
}
onClick?.(clickArg);

View File

@ -25,7 +25,7 @@ import { formatDateToString } from '../../../util/dateFormat';
import switchTheme from '../../../util/switchTheme';
import { setPermanentWebVersion } from '../../../util/permanentWebVersion';
import { clearWebsync } from '../../../util/websync';
import { selectCurrentMessageList, selectIsPremiumPurchaseBlocked, selectTheme } from '../../../global/selectors';
import { selectCurrentMessageList, selectTheme } from '../../../global/selectors';
import { isChatArchived } from '../../../global/helpers';
import useLang from '../../../hooks/useLang';
import useConnectionStatus from '../../../hooks/useConnectionStatus';
@ -38,7 +38,6 @@ import MenuItem from '../../ui/MenuItem';
import Button from '../../ui/Button';
import SearchInput from '../../ui/SearchInput';
import PickerSelectedItem from '../../common/PickerSelectedItem';
import PremiumIcon from '../../common/PremiumIcon';
import Switcher from '../../ui/Switcher';
import ShowTransition from '../../ui/ShowTransition';
import ConnectionStatusOverlay from '../ConnectionStatusOverlay';
@ -70,7 +69,6 @@ type StateProps =
isConnectionStatusMinimized: ISettings['isConnectionStatusMinimized'];
areChatsLoaded?: boolean;
hasPasscode?: boolean;
isPremiumPurchaseBlocked?: boolean;
}
& Pick<GlobalState, 'connectionState' | 'isSyncing' | 'canInstall'>;
@ -101,7 +99,6 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
areChatsLoaded,
hasPasscode,
canInstall,
isPremiumPurchaseBlocked,
}) => {
const {
openChat,
@ -112,7 +109,6 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
lockScreen,
requestNextSettingsScreen,
skipLockOnUnload,
openPremiumModal,
} = getActions();
const lang = useLang();
@ -197,10 +193,6 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
openChat({ id: currentUserId, shouldReplaceHistory: true });
}, [currentUserId, openChat]);
const handleSelectPremium = useCallback(() => {
openPremiumModal();
}, [openPremiumModal]);
const handleDarkModeToggle = useCallback((e: React.SyntheticEvent<HTMLElement>) => {
e.stopPropagation();
const newTheme = theme === 'light' ? 'dark' : 'light';
@ -292,15 +284,6 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
noAnimation
/>
</MenuItem>
{!isPremiumPurchaseBlocked && (
<MenuItem
customIcon={<PremiumIcon withGradient big />}
onClick={handleSelectPremium}
>
{lang('TelegramPremium')}
<span className="menu-item-badge">{lang('New')}</span>
</MenuItem>
)}
<MenuItem
icon="help"
onClick={handleOpenTipsChat}
@ -439,7 +422,6 @@ export default memo(withGlobal<OwnProps>(
areChatsLoaded: Boolean(global.chats.listIds.active),
hasPasscode: Boolean(global.passcode.hasPasscode),
canInstall: Boolean(global.canInstall),
isPremiumPurchaseBlocked: selectIsPremiumPurchaseBlocked(global),
};
},
)(LeftMainHeader));

View File

@ -112,16 +112,6 @@ const SettingsMain: FC<OwnProps & StateProps> = ({
>
{lang('Filters')}
</ListItem>
{canBuyPremium && (
<ListItem
leftElement={<PremiumIcon withGradient big />}
className="settings-main-menu-premium"
// eslint-disable-next-line react/jsx-no-bind
onClick={() => openPremiumModal()}
>
{lang('TelegramPremium')}
</ListItem>
)}
<ListItem
icon="active-sessions"
// eslint-disable-next-line react/jsx-no-bind
@ -138,6 +128,16 @@ const SettingsMain: FC<OwnProps & StateProps> = ({
{lang('Language')}
<span className="settings-item__current-value">{lang.langName}</span>
</ListItem>
{canBuyPremium && (
<ListItem
leftElement={<PremiumIcon withGradient big />}
className="settings-main-menu-premium"
// eslint-disable-next-line react/jsx-no-bind
onClick={() => openPremiumModal()}
>
{lang('TelegramPremium')}
</ListItem>
)}
</div>
</div>
);

View File

@ -106,3 +106,22 @@
}
}
}
.web-app-popup {
.modal-dialog {
max-width: min(30rem, 100%);
}
&.without-title .modal-content {
padding-top: 0;
}
.modal-content {
padding-left: 2rem;
}
.dialog-buttons {
justify-content: flex-end;
gap: 0.25rem;
}
}

View File

@ -1,12 +1,13 @@
import type { FC } from '../../lib/teact/teact';
import React, {
memo, useCallback, useEffect, useMemo, useRef, useState,
} from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global';
import type { FC } from '../../lib/teact/teact';
import type { ApiAttachMenuBot, ApiChat, ApiUser } from '../../api/types';
import type { GlobalState } from '../../global/types';
import type { ThemeKey } from '../../types';
import type { PopupOptions, WebAppInboundEvent } from './hooks/useWebAppFrame';
import windowSize from '../../util/windowSize';
import { IS_SINGLE_COLUMN_LAYOUT } from '../../util/environment';
@ -18,15 +19,16 @@ import { extractCurrentThemeParams, validateHexColor } from '../../util/themeSty
import useInterval from '../../hooks/useInterval';
import useLang from '../../hooks/useLang';
import useOnChange from '../../hooks/useOnChange';
import type { WebAppInboundEvent } from './hooks/useWebAppFrame';
import useWebAppFrame from './hooks/useWebAppFrame';
import usePrevious from '../../hooks/usePrevious';
import useFlag from '../../hooks/useFlag';
import Modal from '../ui/Modal';
import Button from '../ui/Button';
import DropdownMenu from '../ui/DropdownMenu';
import MenuItem from '../ui/MenuItem';
import Spinner from '../ui/Spinner';
import ConfirmDialog from '../ui/ConfirmDialog';
import './WebAppModal.scss';
@ -52,6 +54,8 @@ type StateProps = {
paymentStatus?: GlobalState['payment']['status'];
};
const NBSP = '\u00A0';
const MAIN_BUTTON_ANIMATION_TIME = 250;
const PROLONG_INTERVAL = 45000; // 45s
const ANIMATION_WAIT = 400;
@ -64,6 +68,12 @@ const SANDBOX_ATTRIBUTES = [
'allow-storage-access-by-user-activation',
].join(' ');
const DEFAULT_BUTTON_TEXT: Record<string, string> = {
ok: 'OK',
cancel: 'Cancel',
close: 'Close',
};
const WebAppModal: FC<OwnProps & StateProps> = ({
webApp,
chat,
@ -87,6 +97,12 @@ const WebAppModal: FC<OwnProps & StateProps> = ({
const [isBackButtonVisible, setIsBackButtonVisible] = useState(false);
const [backgroundColor, setBackgroundColor] = useState(extractCurrentThemeParams().bg_color);
const [headerColor, setHeaderColor] = useState(extractCurrentThemeParams().bg_color);
const [confirmClose, setConfirmClose] = useState(false);
const [isCloseModalOpen, openCloseModal, closeCloseModal] = useFlag(false);
const [popupParams, setPopupParams] = useState<PopupOptions | undefined>();
const prevPopupParams = usePrevious(popupParams);
const renderingPopupParams = popupParams || prevPopupParams;
const lang = useLang();
const {
url, buttonText, queryId,
@ -160,6 +176,15 @@ const WebAppModal: FC<OwnProps & StateProps> = ({
isProgressVisible: eventData.is_progress_visible,
});
}
if (eventType === 'web_app_setup_closing_behavior') {
setConfirmClose(eventData.need_confirmation);
}
if (eventType === 'web_app_open_popup') {
if (!eventData.message.trim().length || !eventData.buttons?.length || eventData.buttons.length > 3) return;
setPopupParams(eventData);
}
}, [bot, buttonText, closeWebApp, openInvoice, openTelegramLink, sendWebViewData, setWebAppPaymentSlug]);
const {
@ -192,6 +217,24 @@ const WebAppModal: FC<OwnProps & StateProps> = ({
reloadFrame(webApp!.url);
}, [reloadFrame, webApp]);
const handleClose = useCallback(() => {
if (confirmClose) {
openCloseModal();
} else {
closeWebApp();
}
}, [confirmClose, openCloseModal, closeWebApp]);
const handlePopupClose = useCallback((buttonId?: string) => {
setPopupParams(undefined);
sendEvent({
eventType: 'popup_closed',
eventData: {
button_id: buttonId,
},
});
}, [sendEvent]);
// Notify view that height changed
useOnChange(() => {
setTimeout(() => {
@ -245,9 +288,9 @@ const WebAppModal: FC<OwnProps & StateProps> = ({
eventType: 'back_button_pressed',
});
} else {
closeWebApp();
handleClose();
}
}, [closeWebApp, isBackButtonVisible, sendEvent]);
}, [handleClose, isBackButtonVisible, sendEvent]);
const openBotChat = useCallback(() => {
openChat({
@ -256,6 +299,14 @@ const WebAppModal: FC<OwnProps & StateProps> = ({
closeWebApp();
}, [bot, closeWebApp, openChat]);
useEffect(() => {
if (!isOpen) {
setConfirmClose(false);
closeCloseModal();
setPopupParams(undefined);
}
}, [closeCloseModal, isOpen]);
const MoreMenuButton: FC<{ onTrigger: () => void; isOpen?: boolean }> = useMemo(() => {
return ({ onTrigger, isOpen: isMenuOpen }) => (
<Button
@ -365,7 +416,7 @@ const WebAppModal: FC<OwnProps & StateProps> = ({
<Modal
className="WebAppModal"
isOpen={isOpen}
onClose={closeWebApp}
onClose={handleClose}
header={header}
hasCloseButton
style={`background-color: ${backgroundColor}`}
@ -396,6 +447,43 @@ const WebAppModal: FC<OwnProps & StateProps> = ({
</Button>
</>
)}
{confirmClose && (
<ConfirmDialog
isOpen={isCloseModalOpen}
onClose={closeCloseModal}
title={lang('lng_bot_close_warning_title')}
text={lang('lng_bot_close_warning')}
confirmHandler={closeWebApp}
confirmIsDestructive
confirmLabel={lang('lng_bot_close_warning_sure')}
/>
)}
{renderingPopupParams && (
<Modal
isOpen={Boolean(popupParams)}
title={renderingPopupParams.title || NBSP}
onClose={handlePopupClose}
hasCloseButton
className={buildClassName('web-app-popup', !renderingPopupParams.title?.trim().length && 'without-title')}
>
{renderingPopupParams.message}
<div className="dialog-buttons mt-2">
{renderingPopupParams.buttons.map((button) => (
<Button
key={button.id || button.text || button.type}
color={button.type === 'destructive' ? 'danger' : 'primary'}
isText
fluid
size="smaller"
// eslint-disable-next-line react/jsx-no-bind
onClick={() => handlePopupClose(button.id)}
>
{button.text || lang(DEFAULT_BUTTON_TEXT[button.type])}
</Button>
))}
</div>
</Modal>
)}
</Modal>
);
};

View File

@ -2,6 +2,16 @@ import useWindowSize from '../../../hooks/useWindowSize';
import { useCallback, useEffect, useRef } from '../../../lib/teact/teact';
import { extractCurrentThemeParams } from '../../../util/themeStyle';
export type PopupOptions = {
title: string;
message: string;
buttons: {
id: string;
type: 'default' | 'ok' | 'close' | 'cancel' | 'destructive';
text: string;
}[];
};
export type WebAppInboundEvent = {
eventType: 'web_app_data_send';
eventData: {
@ -54,9 +64,17 @@ export type WebAppInboundEvent = {
eventData: {
color_key: 'bg_color' | 'secondary_bg_color';
};
} | {
eventType: 'web_app_open_popup';
eventData: PopupOptions;
} | {
eventType: 'web_app_setup_closing_behavior';
eventData: {
need_confirmation: boolean;
};
} | {
eventType: 'web_app_request_viewport' | 'web_app_request_theme' | 'web_app_ready' | 'web_app_expand'
| 'web_app_close' | 'iframe_ready';
| 'web_app_request_phone' | 'web_app_close' | 'iframe_ready';
eventData: null;
};
@ -89,6 +107,16 @@ type WebAppOutboundEvent = {
slug: string;
status: 'paid' | 'cancelled' | 'pending' | 'failed';
};
} | {
eventType: 'phone_requested';
eventData: {
phone_number: string;
};
} | {
eventType: 'popup_closed';
eventData: {
button_id?: string;
};
} | {
eventType: 'main_button_pressed' | 'back_button_pressed' | 'settings_button_pressed';
};

View File

@ -23,4 +23,8 @@
.icon {
min-width: 2rem;
height: 2rem;
align-self: center;
border-radius: 0.625rem;
background: var(--item-color, #000);
}

View File

@ -12,17 +12,24 @@ type OwnProps = {
title: string;
text: string;
onClick: VoidFunction;
index: number;
};
const COLORS = [
'#F2862D', '#EB7B4D', '#E46D72', '#DD6091', '#CC5FBA', '#B464E7',
'#9873FF', '#768DFF', '#55A5FC', '#52B0C9', '#4FBC93', '#4CC663',
];
const PremiumFeatureItem: FC<OwnProps> = ({
icon,
title,
text,
index,
onClick,
}) => {
return (
<ListItem buttonClassName={styles.root} onClick={onClick}>
<img src={icon} className={styles.icon} alt="" />
<img src={icon} className={styles.icon} alt="" style={`--item-color: ${COLORS[index]}`} />
<div className={styles.text}>
<div className={styles.title}>{renderText(title, ['br'])}</div>
<div className={styles.description}>{text}</div>

View File

@ -24,9 +24,10 @@ import PremiumFeaturePreviewStickers from './previews/PremiumFeaturePreviewStick
import styles from './PremiumFeatureModal.module.scss';
export const PREMIUM_FEATURE_TITLES: Record<string, string> = {
limits: 'PremiumPreviewLimits',
reactions: 'PremiumPreviewReactions',
stickers: 'PremiumPreviewStickers',
double_limits: 'PremiumPreviewLimits',
unique_reactions: 'PremiumPreviewReactions',
premium_stickers: 'PremiumPreviewStickers',
animated_emoji: 'PremiumPreviewEmoji',
no_ads: 'PremiumPreviewNoAds',
voice_to_text: 'PremiumPreviewVoiceToText',
profile_badge: 'PremiumPreviewProfileBadge',
@ -37,10 +38,11 @@ export const PREMIUM_FEATURE_TITLES: Record<string, string> = {
};
export const PREMIUM_FEATURE_DESCRIPTIONS: Record<string, string> = {
limits: 'PremiumPreviewLimitsDescription',
reactions: 'PremiumPreviewReactionsDescription',
stickers: 'PremiumPreviewStickersDescription',
double_limits: 'PremiumPreviewLimitsDescription',
unique_reactions: 'PremiumPreviewReactionsDescription',
premium_stickers: 'PremiumPreviewStickersDescription',
no_ads: 'PremiumPreviewNoAdsDescription',
animated_emoji: 'PremiumPreviewEmojiDescription',
voice_to_text: 'PremiumPreviewVoiceToTextDescription',
profile_badge: 'PremiumPreviewProfileBadgeDescription',
faster_download: 'PremiumPreviewDownloadSpeedDescription',
@ -50,13 +52,14 @@ export const PREMIUM_FEATURE_DESCRIPTIONS: Record<string, string> = {
};
export const PREMIUM_FEATURE_SECTIONS = [
'limits',
'double_limits',
'more_upload',
'faster_download',
'voice_to_text',
'no_ads',
'reactions',
'stickers',
'unique_reactions',
'premium_stickers',
'animated_emoji',
'advanced_chat_management',
'profile_badge',
'animated_userpics',
@ -212,11 +215,11 @@ const PremiumFeatureModal: FC<OwnProps> = ({
<div className={buildClassName(styles.content, 'no-scrollbar')} onScroll={handleScroll} ref={scrollContainerRef}>
{PREMIUM_FEATURE_SECTIONS.map((section, index) => {
if (section === 'limits') {
if (section === 'double_limits') {
return (
<div className={buildClassName(styles.slide, styles.limits)}>
<h2 className={buildClassName(styles.header, isScrolledToTop && styles.noHeaderBorder)}>
{lang(PREMIUM_FEATURE_TITLES.limits)}
{lang(PREMIUM_FEATURE_TITLES.double_limits)}
</h2>
<div className={buildClassName(styles.limitsContent, 'custom-scroll')} onScroll={handleLimitsScroll}>
{LIMITS_ORDER.map((limit, i) => {
@ -236,33 +239,33 @@ const PremiumFeatureModal: FC<OwnProps> = ({
</div>
);
}
if (section === 'reactions') {
if (section === 'unique_reactions') {
return (
<div className={styles.slide}>
<div className={styles.frame}>
<PremiumFeaturePreviewReactions isActive={currentSlideIndex === index} />
</div>
<h1 className={styles.title}>
{lang(PREMIUM_FEATURE_TITLES.reactions)}
{lang(PREMIUM_FEATURE_TITLES.unique_reactions)}
</h1>
<div className={styles.description}>
{renderText(lang(PREMIUM_FEATURE_DESCRIPTIONS.reactions), ['br'])}
{renderText(lang(PREMIUM_FEATURE_DESCRIPTIONS.unique_reactions), ['br'])}
</div>
</div>
);
}
if (section === 'stickers') {
if (section === 'premium_stickers') {
return (
<div className={styles.slide}>
<div className={styles.frame}>
<PremiumFeaturePreviewStickers isActive={currentSlideIndex === index} />
</div>
<h1 className={styles.title}>
{lang(PREMIUM_FEATURE_TITLES.stickers)}
{lang(PREMIUM_FEATURE_TITLES.premium_stickers)}
</h1>
<div className={styles.description}>
{renderText(lang(PREMIUM_FEATURE_DESCRIPTIONS.stickers), ['br'])}
{renderText(lang(PREMIUM_FEATURE_DESCRIPTIONS.premium_stickers), ['br'])}
</div>
</div>
);

View File

@ -40,15 +40,17 @@ import PremiumStickers from '../../../assets/premium/PremiumStickers.svg';
import PremiumChats from '../../../assets/premium/PremiumChats.svg';
import PremiumBadge from '../../../assets/premium/PremiumBadge.svg';
import PremiumVideo from '../../../assets/premium/PremiumVideo.svg';
import PremiumEmoji from '../../../assets/premium/PremiumEmoji.svg';
import styles from './PremiumMainModal.module.scss';
const LIMIT_ACCOUNTS = 4;
const PREMIUM_FEATURE_COLOR_ICONS: Record<string, string> = {
limits: PremiumLimits,
reactions: PremiumReactions,
stickers: PremiumStickers,
double_limits: PremiumLimits,
unique_reactions: PremiumReactions,
premium_stickers: PremiumStickers,
animated_emoji: PremiumEmoji,
no_ads: PremiumAds,
voice_to_text: PremiumVoice,
profile_badge: PremiumBadge,
@ -76,6 +78,7 @@ type StateProps = {
limits?: NonNullable<GlobalState['appConfig']>['limits'];
premiumSlug?: string;
premiumBotUsername?: string;
premiumPromoOrder?: string[];
};
const PremiumMainModal: FC<OwnProps & StateProps> = ({
@ -93,6 +96,7 @@ const PremiumMainModal: FC<OwnProps & StateProps> = ({
premiumBotUsername,
isClosing,
isSuccess,
premiumPromoOrder,
}) => {
// eslint-disable-next-line no-null/no-null
const dialogRef = useRef<HTMLDivElement>(null);
@ -212,18 +216,22 @@ const PremiumMainModal: FC<OwnProps & StateProps> = ({
</div>
<div className={buildClassName(styles.list, isPremium && styles.noButton)}>
{PREMIUM_FEATURE_SECTIONS.map((section) => (
<PremiumFeatureItem
key={section}
title={lang(PREMIUM_FEATURE_TITLES[section])}
text={section === 'limits'
? lang(PREMIUM_FEATURE_DESCRIPTIONS[section],
[limitChannels, limitFolders, limitPins, limitLinks, LIMIT_ACCOUNTS])
: lang(PREMIUM_FEATURE_DESCRIPTIONS[section])}
icon={PREMIUM_FEATURE_COLOR_ICONS[section]}
onClick={handleOpen(section)}
/>
))}
{(premiumPromoOrder || PREMIUM_FEATURE_SECTIONS).map((section, index) => {
if (!PREMIUM_FEATURE_SECTIONS.includes(section)) return undefined;
return (
<PremiumFeatureItem
key={section}
title={lang(PREMIUM_FEATURE_TITLES[section])}
text={section === 'double_limits'
? lang(PREMIUM_FEATURE_DESCRIPTIONS[section],
[limitChannels, limitFolders, limitPins, limitLinks, LIMIT_ACCOUNTS])
: lang(PREMIUM_FEATURE_DESCRIPTIONS[section])}
icon={PREMIUM_FEATURE_COLOR_ICONS[section]}
index={index}
onClick={handleOpen(section)}
/>
);
})}
<div className={buildClassName(styles.footerText, styles.primaryFooterText)}>
<p>
{renderText(lang('AboutPremiumDescription'), ['simple_markdown'])}
@ -285,5 +293,6 @@ export default memo(withGlobal<OwnProps>((global): StateProps => {
limits: global.appConfig?.limits,
premiumSlug: global.appConfig?.premiumInvoiceSlug,
premiumBotUsername: global.appConfig?.premiumBotUsername,
premiumPromoOrder: global.appConfig?.premiumPromoOrder,
};
})(PremiumMainModal));

View File

@ -70,6 +70,16 @@
}
}
& > .chat-avatar-premium {
position: absolute;
bottom: 0.1875rem;
left: 1.25rem;
height: 0.75rem;
z-index: 1;
--color-fill: white;
}
.quick-reaction {
cursor: pointer;
position: absolute;

View File

@ -116,6 +116,7 @@ import CommentButton from './CommentButton';
import Reactions from './Reactions';
import ReactionStaticEmoji from '../../common/ReactionStaticEmoji';
import MessagePhoneCall from './MessagePhoneCall';
import PremiumIcon from '../../common/PremiumIcon';
import DotAnimation from '../../common/DotAnimation';
import './Message.scss';
@ -598,17 +599,21 @@ const Message: FC<OwnProps & StateProps> = ({
const avatarUser = (avatarPeer && isAvatarPeerUser) ? avatarPeer as ApiUser : undefined;
const avatarChat = (avatarPeer && !isAvatarPeerUser) ? avatarPeer as ApiChat : undefined;
const hiddenName = (!avatarPeer && forwardInfo) ? forwardInfo.hiddenUserName : undefined;
const isAvatarPremium = avatarUser?.isPremium;
return (
<Avatar
size="small"
user={avatarUser}
chat={avatarChat}
text={hiddenName}
lastSyncTime={lastSyncTime}
onClick={(avatarUser || avatarChat) ? handleAvatarClick : undefined}
observeIntersection={observeIntersectionForMedia}
/>
<>
<Avatar
size="small"
user={avatarUser}
chat={avatarChat}
text={hiddenName}
lastSyncTime={lastSyncTime}
onClick={(avatarUser || avatarChat) ? handleAvatarClick : undefined}
observeIntersection={observeIntersectionForMedia}
/>
{isAvatarPremium && <PremiumIcon className="chat-avatar-premium" />}
</>
);
}

View File

@ -88,7 +88,7 @@ const ReactionSelector: FC<OwnProps> = ({
className={cn('blocked-button')}
// eslint-disable-next-line react/jsx-no-bind
onClick={() => openPremiumModal({
initialSection: 'reactions',
initialSection: 'unique_reactions',
})}
>
<i className="icon-lock-badge" />

View File

@ -40,7 +40,7 @@ export const MEDIA_PROGRESSIVE_CACHE_DISABLED = false;
export const MEDIA_PROGRESSIVE_CACHE_NAME = 'tt-media-progressive';
export const MEDIA_CACHE_MAX_BYTES = 512 * 1024; // 512 KB
export const CUSTOM_BG_CACHE_NAME = 'tt-custom-bg';
export const LANG_CACHE_NAME = 'tt-lang-packs-v12';
export const LANG_CACHE_NAME = 'tt-lang-packs-v13';
export const ASSET_CACHE_NAME = 'tt-assets';
export const AUTODOWNLOAD_FILESIZE_MB_LIMITS = [1, 5, 10, 50, 100, 500];

View File

@ -614,7 +614,7 @@ addActionHandler('openTelegramLink', (global, actions, payload) => {
return;
}
if (part1 === 'addstickers') {
if (part1 === 'addstickers' || part1 === 'addemoji') {
actions.openStickerSetShortName({
stickerSetShortName: part2,
});

View File

@ -1,6 +1,6 @@
const api = require('./api');
const LAYER = 143;
const LAYER = 144;
const tlobjects = {};
for (const tl of Object.values(api)) {

View File

@ -70,7 +70,7 @@ namespace Api {
export type TypeChatPhoto = ChatPhotoEmpty | ChatPhoto;
export type TypeMessage = MessageEmpty | Message | MessageService;
export type TypeMessageMedia = MessageMediaEmpty | MessageMediaPhoto | MessageMediaGeo | MessageMediaContact | MessageMediaUnsupported | MessageMediaDocument | MessageMediaWebPage | MessageMediaVenue | MessageMediaGame | MessageMediaInvoice | MessageMediaGeoLive | MessageMediaPoll | MessageMediaDice;
export type TypeMessageAction = MessageActionEmpty | MessageActionChatCreate | MessageActionChatEditTitle | MessageActionChatEditPhoto | MessageActionChatDeletePhoto | MessageActionChatAddUser | MessageActionChatDeleteUser | MessageActionChatJoinedByLink | MessageActionChannelCreate | MessageActionChatMigrateTo | MessageActionChannelMigrateFrom | MessageActionPinMessage | MessageActionHistoryClear | MessageActionGameScore | MessageActionPaymentSentMe | MessageActionPaymentSent | MessageActionPhoneCall | MessageActionScreenshotTaken | MessageActionCustomAction | MessageActionBotAllowed | MessageActionSecureValuesSentMe | MessageActionSecureValuesSent | MessageActionContactSignUp | MessageActionGeoProximityReached | MessageActionGroupCall | MessageActionInviteToGroupCall | MessageActionSetMessagesTTL | MessageActionGroupCallScheduled | MessageActionSetChatTheme | MessageActionChatJoinedByRequest | MessageActionWebViewDataSentMe | MessageActionWebViewDataSent;
export type TypeMessageAction = MessageActionEmpty | MessageActionChatCreate | MessageActionChatEditTitle | MessageActionChatEditPhoto | MessageActionChatDeletePhoto | MessageActionChatAddUser | MessageActionChatDeleteUser | MessageActionChatJoinedByLink | MessageActionChannelCreate | MessageActionChatMigrateTo | MessageActionChannelMigrateFrom | MessageActionPinMessage | MessageActionHistoryClear | MessageActionGameScore | MessageActionPaymentSentMe | MessageActionPaymentSent | MessageActionPhoneCall | MessageActionScreenshotTaken | MessageActionCustomAction | MessageActionBotAllowed | MessageActionSecureValuesSentMe | MessageActionSecureValuesSent | MessageActionContactSignUp | MessageActionGeoProximityReached | MessageActionGroupCall | MessageActionInviteToGroupCall | MessageActionSetMessagesTTL | MessageActionGroupCallScheduled | MessageActionSetChatTheme | MessageActionChatJoinedByRequest | MessageActionWebViewDataSentMe | MessageActionWebViewDataSent | MessageActionGiftPremium;
export type TypeDialog = Dialog | DialogFolder;
export type TypePhoto = PhotoEmpty | Photo;
export type TypePhotoSize = PhotoSizeEmpty | PhotoSize | PhotoCachedSize | PhotoStrippedSize | PhotoSizeProgressive | PhotoPathSize;
@ -86,7 +86,7 @@ namespace Api {
export type TypeImportedContact = ImportedContact;
export type TypeContactStatus = ContactStatus;
export type TypeMessagesFilter = InputMessagesFilterEmpty | InputMessagesFilterPhotos | InputMessagesFilterVideo | InputMessagesFilterPhotoVideo | InputMessagesFilterDocument | InputMessagesFilterUrl | InputMessagesFilterGif | InputMessagesFilterVoice | InputMessagesFilterMusic | InputMessagesFilterChatPhotos | InputMessagesFilterPhoneCalls | InputMessagesFilterRoundVoice | InputMessagesFilterRoundVideo | InputMessagesFilterMyMentions | InputMessagesFilterGeo | InputMessagesFilterContacts | InputMessagesFilterPinned;
export type TypeUpdate = UpdateNewMessage | UpdateMessageID | UpdateDeleteMessages | UpdateUserTyping | UpdateChatUserTyping | UpdateChatParticipants | UpdateUserStatus | UpdateUserName | UpdateUserPhoto | UpdateNewEncryptedMessage | UpdateEncryptedChatTyping | UpdateEncryption | UpdateEncryptedMessagesRead | UpdateChatParticipantAdd | UpdateChatParticipantDelete | UpdateDcOptions | UpdateNotifySettings | UpdateServiceNotification | UpdatePrivacy | UpdateUserPhone | UpdateReadHistoryInbox | UpdateReadHistoryOutbox | UpdateWebPage | UpdateReadMessagesContents | UpdateChannelTooLong | UpdateChannel | UpdateNewChannelMessage | UpdateReadChannelInbox | UpdateDeleteChannelMessages | UpdateChannelMessageViews | UpdateChatParticipantAdmin | UpdateNewStickerSet | UpdateStickerSetsOrder | UpdateStickerSets | UpdateSavedGifs | UpdateBotInlineQuery | UpdateBotInlineSend | UpdateEditChannelMessage | UpdateBotCallbackQuery | UpdateEditMessage | UpdateInlineBotCallbackQuery | UpdateReadChannelOutbox | UpdateDraftMessage | UpdateReadFeaturedStickers | UpdateRecentStickers | UpdateConfig | UpdatePtsChanged | UpdateChannelWebPage | UpdateDialogPinned | UpdatePinnedDialogs | UpdateBotWebhookJSON | UpdateBotWebhookJSONQuery | UpdateBotShippingQuery | UpdateBotPrecheckoutQuery | UpdatePhoneCall | UpdateLangPackTooLong | UpdateLangPack | UpdateFavedStickers | UpdateChannelReadMessagesContents | UpdateContactsReset | UpdateChannelAvailableMessages | UpdateDialogUnreadMark | UpdateMessagePoll | UpdateChatDefaultBannedRights | UpdateFolderPeers | UpdatePeerSettings | UpdatePeerLocated | UpdateNewScheduledMessage | UpdateDeleteScheduledMessages | UpdateTheme | UpdateGeoLiveViewed | UpdateLoginToken | UpdateMessagePollVote | UpdateDialogFilter | UpdateDialogFilterOrder | UpdateDialogFilters | UpdatePhoneCallSignalingData | UpdateChannelMessageForwards | UpdateReadChannelDiscussionInbox | UpdateReadChannelDiscussionOutbox | UpdatePeerBlocked | UpdateChannelUserTyping | UpdatePinnedMessages | UpdatePinnedChannelMessages | UpdateChat | UpdateGroupCallParticipants | UpdateGroupCall | UpdatePeerHistoryTTL | UpdateChatParticipant | UpdateChannelParticipant | UpdateBotStopped | UpdateGroupCallConnection | UpdateBotCommands | UpdatePendingJoinRequests | UpdateBotChatInviteRequester | UpdateMessageReactions | UpdateAttachMenuBots | UpdateWebViewResultSent | UpdateBotMenuButton | UpdateSavedRingtones | UpdateTranscribedAudio;
export type TypeUpdate = UpdateNewMessage | UpdateMessageID | UpdateDeleteMessages | UpdateUserTyping | UpdateChatUserTyping | UpdateChatParticipants | UpdateUserStatus | UpdateUserName | UpdateUserPhoto | UpdateNewEncryptedMessage | UpdateEncryptedChatTyping | UpdateEncryption | UpdateEncryptedMessagesRead | UpdateChatParticipantAdd | UpdateChatParticipantDelete | UpdateDcOptions | UpdateNotifySettings | UpdateServiceNotification | UpdatePrivacy | UpdateUserPhone | UpdateReadHistoryInbox | UpdateReadHistoryOutbox | UpdateWebPage | UpdateReadMessagesContents | UpdateChannelTooLong | UpdateChannel | UpdateNewChannelMessage | UpdateReadChannelInbox | UpdateDeleteChannelMessages | UpdateChannelMessageViews | UpdateChatParticipantAdmin | UpdateNewStickerSet | UpdateStickerSetsOrder | UpdateStickerSets | UpdateSavedGifs | UpdateBotInlineQuery | UpdateBotInlineSend | UpdateEditChannelMessage | UpdateBotCallbackQuery | UpdateEditMessage | UpdateInlineBotCallbackQuery | UpdateReadChannelOutbox | UpdateDraftMessage | UpdateReadFeaturedStickers | UpdateRecentStickers | UpdateConfig | UpdatePtsChanged | UpdateChannelWebPage | UpdateDialogPinned | UpdatePinnedDialogs | UpdateBotWebhookJSON | UpdateBotWebhookJSONQuery | UpdateBotShippingQuery | UpdateBotPrecheckoutQuery | UpdatePhoneCall | UpdateLangPackTooLong | UpdateLangPack | UpdateFavedStickers | UpdateChannelReadMessagesContents | UpdateContactsReset | UpdateChannelAvailableMessages | UpdateDialogUnreadMark | UpdateMessagePoll | UpdateChatDefaultBannedRights | UpdateFolderPeers | UpdatePeerSettings | UpdatePeerLocated | UpdateNewScheduledMessage | UpdateDeleteScheduledMessages | UpdateTheme | UpdateGeoLiveViewed | UpdateLoginToken | UpdateMessagePollVote | UpdateDialogFilter | UpdateDialogFilterOrder | UpdateDialogFilters | UpdatePhoneCallSignalingData | UpdateChannelMessageForwards | UpdateReadChannelDiscussionInbox | UpdateReadChannelDiscussionOutbox | UpdatePeerBlocked | UpdateChannelUserTyping | UpdatePinnedMessages | UpdatePinnedChannelMessages | UpdateChat | UpdateGroupCallParticipants | UpdateGroupCall | UpdatePeerHistoryTTL | UpdateChatParticipant | UpdateChannelParticipant | UpdateBotStopped | UpdateGroupCallConnection | UpdateBotCommands | UpdatePendingJoinRequests | UpdateBotChatInviteRequester | UpdateMessageReactions | UpdateAttachMenuBots | UpdateWebViewResultSent | UpdateBotMenuButton | UpdateSavedRingtones | UpdateTranscribedAudio | UpdateReadFeaturedEmojiStickers;
export type TypeUpdates = UpdatesTooLong | UpdateShortMessage | UpdateShortChatMessage | UpdateShort | UpdatesCombined | Updates | UpdateShortSentMessage;
export type TypeDcOption = DcOption;
export type TypeConfig = Config;
@ -100,26 +100,26 @@ namespace Api {
export type TypeDocument = DocumentEmpty | Document;
export type TypeNotifyPeer = NotifyPeer | NotifyUsers | NotifyChats | NotifyBroadcasts;
export type TypeSendMessageAction = SendMessageTypingAction | SendMessageCancelAction | SendMessageRecordVideoAction | SendMessageUploadVideoAction | SendMessageRecordAudioAction | SendMessageUploadAudioAction | SendMessageUploadPhotoAction | SendMessageUploadDocumentAction | SendMessageGeoLocationAction | SendMessageChooseContactAction | SendMessageGamePlayAction | SendMessageRecordRoundAction | SendMessageUploadRoundAction | SpeakingInGroupCallAction | SendMessageHistoryImportAction | SendMessageChooseStickerAction | SendMessageEmojiInteraction | SendMessageEmojiInteractionSeen;
export type TypeInputPrivacyKey = InputPrivacyKeyStatusTimestamp | InputPrivacyKeyChatInvite | InputPrivacyKeyPhoneCall | InputPrivacyKeyPhoneP2P | InputPrivacyKeyForwards | InputPrivacyKeyProfilePhoto | InputPrivacyKeyPhoneNumber | InputPrivacyKeyAddedByPhone;
export type TypePrivacyKey = PrivacyKeyStatusTimestamp | PrivacyKeyChatInvite | PrivacyKeyPhoneCall | PrivacyKeyPhoneP2P | PrivacyKeyForwards | PrivacyKeyProfilePhoto | PrivacyKeyPhoneNumber | PrivacyKeyAddedByPhone;
export type TypeInputPrivacyKey = InputPrivacyKeyStatusTimestamp | InputPrivacyKeyChatInvite | InputPrivacyKeyPhoneCall | InputPrivacyKeyPhoneP2P | InputPrivacyKeyForwards | InputPrivacyKeyProfilePhoto | InputPrivacyKeyPhoneNumber | InputPrivacyKeyAddedByPhone | InputPrivacyKeyVoiceMessages;
export type TypePrivacyKey = PrivacyKeyStatusTimestamp | PrivacyKeyChatInvite | PrivacyKeyPhoneCall | PrivacyKeyPhoneP2P | PrivacyKeyForwards | PrivacyKeyProfilePhoto | PrivacyKeyPhoneNumber | PrivacyKeyAddedByPhone | PrivacyKeyVoiceMessages;
export type TypeInputPrivacyRule = InputPrivacyValueAllowContacts | InputPrivacyValueAllowAll | InputPrivacyValueAllowUsers | InputPrivacyValueDisallowContacts | InputPrivacyValueDisallowAll | InputPrivacyValueDisallowUsers | InputPrivacyValueAllowChatParticipants | InputPrivacyValueDisallowChatParticipants;
export type TypePrivacyRule = PrivacyValueAllowContacts | PrivacyValueAllowAll | PrivacyValueAllowUsers | PrivacyValueDisallowContacts | PrivacyValueDisallowAll | PrivacyValueDisallowUsers | PrivacyValueAllowChatParticipants | PrivacyValueDisallowChatParticipants;
export type TypeAccountDaysTTL = AccountDaysTTL;
export type TypeDocumentAttribute = DocumentAttributeImageSize | DocumentAttributeAnimated | DocumentAttributeSticker | DocumentAttributeVideo | DocumentAttributeAudio | DocumentAttributeFilename | DocumentAttributeHasStickers;
export type TypeDocumentAttribute = DocumentAttributeImageSize | DocumentAttributeAnimated | DocumentAttributeSticker | DocumentAttributeVideo | DocumentAttributeAudio | DocumentAttributeFilename | DocumentAttributeHasStickers | DocumentAttributeCustomEmoji;
export type TypeStickerPack = StickerPack;
export type TypeWebPage = WebPageEmpty | WebPagePending | WebPage | WebPageNotModified;
export type TypeAuthorization = Authorization;
export type TypeReceivedNotifyMessage = ReceivedNotifyMessage;
export type TypeExportedChatInvite = ChatInviteExported | ChatInvitePublicJoinRequests;
export type TypeChatInvite = ChatInviteAlready | ChatInvite | ChatInvitePeek;
export type TypeInputStickerSet = InputStickerSetEmpty | InputStickerSetID | InputStickerSetShortName | InputStickerSetAnimatedEmoji | InputStickerSetDice | InputStickerSetAnimatedEmojiAnimations;
export type TypeInputStickerSet = InputStickerSetEmpty | InputStickerSetID | InputStickerSetShortName | InputStickerSetAnimatedEmoji | InputStickerSetDice | InputStickerSetAnimatedEmojiAnimations | InputStickerSetPremiumGifts;
export type TypeStickerSet = StickerSet;
export type TypeBotCommand = BotCommand;
export type TypeBotInfo = BotInfo;
export type TypeKeyboardButton = KeyboardButton | KeyboardButtonUrl | KeyboardButtonCallback | KeyboardButtonRequestPhone | KeyboardButtonRequestGeoLocation | KeyboardButtonSwitchInline | KeyboardButtonGame | KeyboardButtonBuy | KeyboardButtonUrlAuth | InputKeyboardButtonUrlAuth | KeyboardButtonRequestPoll | InputKeyboardButtonUserProfile | KeyboardButtonUserProfile | KeyboardButtonWebView | KeyboardButtonSimpleWebView;
export type TypeKeyboardButtonRow = KeyboardButtonRow;
export type TypeReplyMarkup = ReplyKeyboardHide | ReplyKeyboardForceReply | ReplyKeyboardMarkup | ReplyInlineMarkup;
export type TypeMessageEntity = MessageEntityUnknown | MessageEntityMention | MessageEntityHashtag | MessageEntityBotCommand | MessageEntityUrl | MessageEntityEmail | MessageEntityBold | MessageEntityItalic | MessageEntityCode | MessageEntityPre | MessageEntityTextUrl | MessageEntityMentionName | InputMessageEntityMentionName | MessageEntityPhone | MessageEntityCashtag | MessageEntityUnderline | MessageEntityStrike | MessageEntityBlockquote | MessageEntityBankCard | MessageEntitySpoiler;
export type TypeMessageEntity = MessageEntityUnknown | MessageEntityMention | MessageEntityHashtag | MessageEntityBotCommand | MessageEntityUrl | MessageEntityEmail | MessageEntityBold | MessageEntityItalic | MessageEntityCode | MessageEntityPre | MessageEntityTextUrl | MessageEntityMentionName | InputMessageEntityMentionName | MessageEntityPhone | MessageEntityCashtag | MessageEntityUnderline | MessageEntityStrike | MessageEntityBlockquote | MessageEntityBankCard | MessageEntitySpoiler | MessageEntityCustomEmoji;
export type TypeInputChannel = InputChannelEmpty | InputChannel | InputChannelFromMessage;
export type TypeMessageRange = MessageRange;
export type TypeChannelMessagesFilter = ChannelMessagesFilterEmpty | ChannelMessagesFilter;
@ -137,7 +137,7 @@ namespace Api {
export type TypeTopPeerCategory = TopPeerCategoryBotsPM | TopPeerCategoryBotsInline | TopPeerCategoryCorrespondents | TopPeerCategoryGroups | TopPeerCategoryChannels | TopPeerCategoryPhoneCalls | TopPeerCategoryForwardUsers | TopPeerCategoryForwardChats;
export type TypeTopPeerCategoryPeers = TopPeerCategoryPeers;
export type TypeDraftMessage = DraftMessageEmpty | DraftMessage;
export type TypeStickerSetCovered = StickerSetCovered | StickerSetMultiCovered;
export type TypeStickerSetCovered = StickerSetCovered | StickerSetMultiCovered | StickerSetFullCovered;
export type TypeMaskCoords = MaskCoords;
export type TypeInputStickeredMedia = InputStickeredMediaPhoto | InputStickeredMediaDocument;
export type TypeGame = Game;
@ -155,7 +155,7 @@ namespace Api {
export type TypePaymentSavedCredentials = PaymentSavedCredentialsCard;
export type TypeWebDocument = WebDocument | WebDocumentNoProxy;
export type TypeInputWebDocument = InputWebDocument;
export type TypeInputWebFileLocation = InputWebFileLocation | InputWebFileGeoPointLocation;
export type TypeInputWebFileLocation = InputWebFileLocation | InputWebFileGeoPointLocation | InputWebFileAudioAlbumThumbLocation;
export type TypeInputPaymentCredentials = InputPaymentCredentialsSaved | InputPaymentCredentials | InputPaymentCredentialsApplePay | InputPaymentCredentialsGooglePay;
export type TypeShippingOption = ShippingOption;
export type TypeInputStickerSetItem = InputStickerSetItem;
@ -282,6 +282,9 @@ namespace Api {
export type TypeNotificationSound = NotificationSoundDefault | NotificationSoundNone | NotificationSoundLocal | NotificationSoundRingtone;
export type TypeAttachMenuPeerType = AttachMenuPeerTypeSameBotPM | AttachMenuPeerTypeBotPM | AttachMenuPeerTypePM | AttachMenuPeerTypeChat | AttachMenuPeerTypeBroadcast;
export type TypeInputInvoice = InputInvoiceMessage | InputInvoiceSlug;
export type TypeInputStorePaymentPurpose = InputStorePaymentPremiumSubscription | InputStorePaymentGiftPremium;
export type TypePremiumGiftOption = PremiumGiftOption;
export type TypePaymentFormMethod = PaymentFormMethod;
export type TypeResPQ = ResPQ;
export type TypeP_Q_inner_data = PQInnerData | PQInnerDataDc | PQInnerDataTemp | PQInnerDataTempDc;
export type TypeServer_DH_Params = ServerDHParamsFail | ServerDHParamsOk;
@ -1703,6 +1706,15 @@ namespace Api {
}> {
text: string;
};
export class MessageActionGiftPremium extends VirtualClass<{
currency: string;
amount: long;
months: int;
}> {
currency: string;
amount: long;
months: int;
};
export class Dialog extends VirtualClass<{
// flags: undefined;
pinned?: true;
@ -1968,6 +1980,7 @@ namespace Api {
canPinMessage?: true;
hasScheduled?: true;
videoCallsAvailable?: true;
voiceMessagesForbidden?: true;
id: long;
about?: string;
settings: Api.TypePeerSettings;
@ -1982,6 +1995,7 @@ namespace Api {
privateForwardName?: string;
botGroupAdminRights?: Api.TypeChatAdminRights;
botBroadcastAdminRights?: Api.TypeChatAdminRights;
premiumGifts?: Api.TypePremiumGiftOption[];
}> {
// flags: undefined;
blocked?: true;
@ -1990,6 +2004,7 @@ namespace Api {
canPinMessage?: true;
hasScheduled?: true;
videoCallsAvailable?: true;
voiceMessagesForbidden?: true;
id: long;
about?: string;
settings: Api.TypePeerSettings;
@ -2004,6 +2019,7 @@ namespace Api {
privateForwardName?: string;
botGroupAdminRights?: Api.TypeChatAdminRights;
botBroadcastAdminRights?: Api.TypeChatAdminRights;
premiumGifts?: Api.TypePremiumGiftOption[];
};
export class Contact extends VirtualClass<{
userId: long;
@ -2340,10 +2356,12 @@ namespace Api {
export class UpdateStickerSetsOrder extends VirtualClass<{
// flags: undefined;
masks?: true;
emojis?: true;
order: long[];
}> {
// flags: undefined;
masks?: true;
emojis?: true;
order: long[];
};
export class UpdateStickerSets extends VirtualClass<void> {};
@ -2912,6 +2930,7 @@ namespace Api {
transcriptionId: long;
text: string;
};
export class UpdateReadFeaturedEmojiStickers extends VirtualClass<void> {};
export class UpdatesTooLong extends VirtualClass<void> {};
export class UpdateShortMessage extends VirtualClass<{
// flags: undefined;
@ -3430,6 +3449,7 @@ namespace Api {
export class InputPrivacyKeyProfilePhoto extends VirtualClass<void> {};
export class InputPrivacyKeyPhoneNumber extends VirtualClass<void> {};
export class InputPrivacyKeyAddedByPhone extends VirtualClass<void> {};
export class InputPrivacyKeyVoiceMessages extends VirtualClass<void> {};
export class PrivacyKeyStatusTimestamp extends VirtualClass<void> {};
export class PrivacyKeyChatInvite extends VirtualClass<void> {};
export class PrivacyKeyPhoneCall extends VirtualClass<void> {};
@ -3438,6 +3458,7 @@ namespace Api {
export class PrivacyKeyProfilePhoto extends VirtualClass<void> {};
export class PrivacyKeyPhoneNumber extends VirtualClass<void> {};
export class PrivacyKeyAddedByPhone extends VirtualClass<void> {};
export class PrivacyKeyVoiceMessages extends VirtualClass<void> {};
export class InputPrivacyValueAllowContacts extends VirtualClass<void> {};
export class InputPrivacyValueAllowAll extends VirtualClass<void> {};
export class InputPrivacyValueAllowUsers extends VirtualClass<{
@ -3548,6 +3569,17 @@ namespace Api {
fileName: string;
};
export class DocumentAttributeHasStickers extends VirtualClass<void> {};
export class DocumentAttributeCustomEmoji extends VirtualClass<{
// flags: undefined;
free?: true;
alt: string;
stickerset: Api.TypeInputStickerSet;
}> {
// flags: undefined;
free?: true;
alt: string;
stickerset: Api.TypeInputStickerSet;
};
export class StickerPack extends VirtualClass<{
emoticon: string;
documents: long[];
@ -3748,6 +3780,7 @@ namespace Api {
emoticon: string;
};
export class InputStickerSetAnimatedEmojiAnimations extends VirtualClass<void> {};
export class InputStickerSetPremiumGifts extends VirtualClass<void> {};
export class StickerSet extends VirtualClass<{
// flags: undefined;
archived?: true;
@ -3755,6 +3788,7 @@ namespace Api {
masks?: true;
animated?: true;
videos?: true;
emojis?: true;
installedDate?: int;
id: long;
accessHash: long;
@ -3763,6 +3797,7 @@ namespace Api {
thumbs?: Api.TypePhotoSize[];
thumbDcId?: int;
thumbVersion?: int;
thumbDocumentId?: long;
count: int;
hash: int;
}> {
@ -3772,6 +3807,7 @@ namespace Api {
masks?: true;
animated?: true;
videos?: true;
emojis?: true;
installedDate?: int;
id: long;
accessHash: long;
@ -3780,6 +3816,7 @@ namespace Api {
thumbs?: Api.TypePhotoSize[];
thumbDcId?: int;
thumbVersion?: int;
thumbDocumentId?: long;
count: int;
hash: int;
};
@ -4117,6 +4154,15 @@ namespace Api {
offset: int;
length: int;
};
export class MessageEntityCustomEmoji extends VirtualClass<{
offset: int;
length: int;
documentId: long;
}> {
offset: int;
length: int;
documentId: long;
};
export class InputChannelEmpty extends VirtualClass<void> {};
export class InputChannel extends VirtualClass<{
channelId: long;
@ -4665,6 +4711,15 @@ namespace Api {
set: Api.TypeStickerSet;
covers: Api.TypeDocument[];
};
export class StickerSetFullCovered extends VirtualClass<{
set: Api.TypeStickerSet;
packs: Api.TypeStickerPack[];
documents: Api.TypeDocument[];
}> {
set: Api.TypeStickerSet;
packs: Api.TypeStickerPack[];
documents: Api.TypeDocument[];
};
export class MaskCoords extends VirtualClass<{
n: int;
x: double;
@ -5185,6 +5240,17 @@ namespace Api {
zoom: int;
scale: int;
};
export class InputWebFileAudioAlbumThumbLocation extends VirtualClass<{
// flags: undefined;
document?: Api.TypeInputDocument;
title?: string;
performer?: string;
} | void> {
// flags: undefined;
document?: Api.TypeInputDocument;
title?: string;
performer?: string;
};
export class InputPaymentCredentialsSaved extends VirtualClass<{
id: string;
tmpPassword: bytes;
@ -7316,6 +7382,44 @@ namespace Api {
}> {
slug: string;
};
export class InputStorePaymentPremiumSubscription extends VirtualClass<{
// flags: undefined;
restore?: true;
} | void> {
// flags: undefined;
restore?: true;
};
export class InputStorePaymentGiftPremium extends VirtualClass<{
userId: Api.TypeInputUser;
currency: string;
amount: long;
}> {
userId: Api.TypeInputUser;
currency: string;
amount: long;
};
export class PremiumGiftOption extends VirtualClass<{
// flags: undefined;
months: int;
currency: string;
amount: long;
botUrl: string;
storeProduct?: string;
}> {
// flags: undefined;
months: int;
currency: string;
amount: long;
botUrl: string;
storeProduct?: string;
};
export class PaymentFormMethod extends VirtualClass<{
url: string;
title: string;
}> {
url: string;
title: string;
};
export class ResPQ extends VirtualClass<{
nonce: int128;
serverNonce: int128;
@ -8993,8 +9097,9 @@ namespace Api {
url: string;
nativeProvider?: string;
nativeParams?: Api.TypeDataJSON;
additionalMethods?: Api.TypePaymentFormMethod[];
savedInfo?: Api.TypePaymentRequestedInfo;
savedCredentials?: Api.TypePaymentSavedCredentials;
savedCredentials?: Api.TypePaymentSavedCredentials[];
users: Api.TypeUser[];
}> {
// flags: undefined;
@ -9010,8 +9115,9 @@ namespace Api {
url: string;
nativeProvider?: string;
nativeParams?: Api.TypeDataJSON;
additionalMethods?: Api.TypePaymentFormMethod[];
savedInfo?: Api.TypePaymentRequestedInfo;
savedCredentials?: Api.TypePaymentSavedCredentials;
savedCredentials?: Api.TypePaymentSavedCredentials[];
users: Api.TypeUser[];
};
export class ValidatedRequestedInfo extends VirtualClass<{
@ -9606,9 +9712,13 @@ namespace Api {
rules: Api.TypeInputPrivacyRule[];
};
export class DeleteAccount extends Request<Partial<{
// flags: undefined;
reason: string;
password?: Api.TypeInputCheckPasswordSRP;
}>, Bool> {
// flags: undefined;
reason: string;
password?: Api.TypeInputCheckPasswordSRP;
};
export class GetAccountTTL extends Request<void, Api.TypeAccountDaysTTL> {};
export class SetAccountTTL extends Request<Partial<{
@ -10680,10 +10790,12 @@ namespace Api {
export class ReorderStickerSets extends Request<Partial<{
// flags: undefined;
masks?: true;
emojis?: true;
order: long[];
}>, Bool> {
// flags: undefined;
masks?: true;
emojis?: true;
order: long[];
};
export class GetDocumentByHash extends Request<Partial<{
@ -10904,11 +11016,13 @@ namespace Api {
export class GetArchivedStickers extends Request<Partial<{
// flags: undefined;
masks?: true;
emojis?: true;
offsetId: long;
limit: int;
}>, messages.TypeArchivedStickers> {
// flags: undefined;
masks?: true;
emojis?: true;
offsetId: long;
limit: int;
};
@ -11792,6 +11906,21 @@ namespace Api {
transcriptionId: long;
good: Bool;
};
export class GetCustomEmojiDocuments extends Request<Partial<{
documentId: long[];
}>, Api.TypeDocument[]> {
documentId: long[];
};
export class GetEmojiStickers extends Request<Partial<{
hash: long;
}>, messages.TypeAllStickers> {
hash: long;
};
export class GetFeaturedEmojiStickers extends Request<Partial<{
hash: long;
}>, messages.TypeFeaturedStickers> {
hash: long;
};
}
export namespace updates {
@ -12468,27 +12597,24 @@ namespace Api {
invoiceMedia: Api.TypeInputMedia;
};
export class AssignAppStoreTransaction extends Request<Partial<{
// flags: undefined;
restore?: true;
transactionId: string;
receipt: bytes;
purpose: Api.TypeInputStorePaymentPurpose;
}>, Api.TypeUpdates> {
// flags: undefined;
restore?: true;
transactionId: string;
receipt: bytes;
purpose: Api.TypeInputStorePaymentPurpose;
};
export class AssignPlayMarketTransaction extends Request<Partial<{
purchaseToken: string;
receipt: Api.TypeDataJSON;
purpose: Api.TypeInputStorePaymentPurpose;
}>, Api.TypeUpdates> {
purchaseToken: string;
receipt: Api.TypeDataJSON;
purpose: Api.TypeInputStorePaymentPurpose;
};
export class RestorePlayMarketReceipt extends Request<Partial<{
receipt: bytes;
}>, Api.TypeUpdates> {
receipt: bytes;
export class CanPurchasePremium extends Request<Partial<{
purpose: Api.TypeInputStorePaymentPurpose;
}>, Bool> {
purpose: Api.TypeInputStorePaymentPurpose;
};
export class CanPurchasePremium extends Request<void, Bool> {};
export class RequestRecurringPayment extends Request<Partial<{
userId: Api.TypeInputUser;
recurringInitCharge: string;
@ -12958,14 +13084,14 @@ namespace Api {
| account.RegisterDevice | account.UnregisterDevice | account.UpdateNotifySettings | account.GetNotifySettings | account.ResetNotifySettings | account.UpdateProfile | account.UpdateStatus | account.GetWallPapers | account.ReportPeer | account.CheckUsername | account.UpdateUsername | account.GetPrivacy | account.SetPrivacy | account.DeleteAccount | account.GetAccountTTL | account.SetAccountTTL | account.SendChangePhoneCode | account.ChangePhone | account.UpdateDeviceLocked | account.GetAuthorizations | account.ResetAuthorization | account.GetPassword | account.GetPasswordSettings | account.UpdatePasswordSettings | account.SendConfirmPhoneCode | account.ConfirmPhone | account.GetTmpPassword | account.GetWebAuthorizations | account.ResetWebAuthorization | account.ResetWebAuthorizations | account.GetAllSecureValues | account.GetSecureValue | account.SaveSecureValue | account.DeleteSecureValue | account.GetAuthorizationForm | account.AcceptAuthorization | account.SendVerifyPhoneCode | account.VerifyPhone | account.SendVerifyEmailCode | account.VerifyEmail | account.InitTakeoutSession | account.FinishTakeoutSession | account.ConfirmPasswordEmail | account.ResendPasswordEmail | account.CancelPasswordEmail | account.GetContactSignUpNotification | account.SetContactSignUpNotification | account.GetNotifyExceptions | account.GetWallPaper | account.UploadWallPaper | account.SaveWallPaper | account.InstallWallPaper | account.ResetWallPapers | account.GetAutoDownloadSettings | account.SaveAutoDownloadSettings | account.UploadTheme | account.CreateTheme | account.UpdateTheme | account.SaveTheme | account.InstallTheme | account.GetTheme | account.GetThemes | account.SetContentSettings | account.GetContentSettings | account.GetMultiWallPapers | account.GetGlobalPrivacySettings | account.SetGlobalPrivacySettings | account.ReportProfilePhoto | account.ResetPassword | account.DeclinePasswordReset | account.GetChatThemes | account.SetAuthorizationTTL | account.ChangeAuthorizationSettings | account.GetSavedRingtones | account.SaveRingtone | account.UploadRingtone
| users.GetUsers | users.GetFullUser | users.SetSecureValueErrors
| contacts.GetContactIDs | contacts.GetStatuses | contacts.GetContacts | contacts.ImportContacts | contacts.DeleteContacts | contacts.DeleteByPhones | contacts.Block | contacts.Unblock | contacts.GetBlocked | contacts.Search | contacts.ResolveUsername | contacts.GetTopPeers | contacts.ResetTopPeerRating | contacts.ResetSaved | contacts.GetSaved | contacts.ToggleTopPeers | contacts.AddContact | contacts.AcceptContact | contacts.GetLocated | contacts.BlockFromReplies | contacts.ResolvePhone
| messages.GetMessages | messages.GetDialogs | messages.GetHistory | messages.Search | messages.ReadHistory | messages.DeleteHistory | messages.DeleteMessages | messages.ReceivedMessages | messages.SetTyping | messages.SendMessage | messages.SendMedia | messages.ForwardMessages | messages.ReportSpam | messages.GetPeerSettings | messages.Report | messages.GetChats | messages.GetFullChat | messages.EditChatTitle | messages.EditChatPhoto | messages.AddChatUser | messages.DeleteChatUser | messages.CreateChat | messages.GetDhConfig | messages.RequestEncryption | messages.AcceptEncryption | messages.DiscardEncryption | messages.SetEncryptedTyping | messages.ReadEncryptedHistory | messages.SendEncrypted | messages.SendEncryptedFile | messages.SendEncryptedService | messages.ReceivedQueue | messages.ReportEncryptedSpam | messages.ReadMessageContents | messages.GetStickers | messages.GetAllStickers | messages.GetWebPagePreview | messages.ExportChatInvite | messages.CheckChatInvite | messages.ImportChatInvite | messages.GetStickerSet | messages.InstallStickerSet | messages.UninstallStickerSet | messages.StartBot | messages.GetMessagesViews | messages.EditChatAdmin | messages.MigrateChat | messages.SearchGlobal | messages.ReorderStickerSets | messages.GetDocumentByHash | messages.GetSavedGifs | messages.SaveGif | messages.GetInlineBotResults | messages.SetInlineBotResults | messages.SendInlineBotResult | messages.GetMessageEditData | messages.EditMessage | messages.EditInlineBotMessage | messages.GetBotCallbackAnswer | messages.SetBotCallbackAnswer | messages.GetPeerDialogs | messages.SaveDraft | messages.GetAllDrafts | messages.GetFeaturedStickers | messages.ReadFeaturedStickers | messages.GetRecentStickers | messages.SaveRecentSticker | messages.ClearRecentStickers | messages.GetArchivedStickers | messages.GetMaskStickers | messages.GetAttachedStickers | messages.SetGameScore | messages.SetInlineGameScore | messages.GetGameHighScores | messages.GetInlineGameHighScores | messages.GetCommonChats | messages.GetAllChats | messages.GetWebPage | messages.ToggleDialogPin | messages.ReorderPinnedDialogs | messages.GetPinnedDialogs | messages.SetBotShippingResults | messages.SetBotPrecheckoutResults | messages.UploadMedia | messages.SendScreenshotNotification | messages.GetFavedStickers | messages.FaveSticker | messages.GetUnreadMentions | messages.ReadMentions | messages.GetRecentLocations | messages.SendMultiMedia | messages.UploadEncryptedFile | messages.SearchStickerSets | messages.GetSplitRanges | messages.MarkDialogUnread | messages.GetDialogUnreadMarks | messages.ClearAllDrafts | messages.UpdatePinnedMessage | messages.SendVote | messages.GetPollResults | messages.GetOnlines | messages.EditChatAbout | messages.EditChatDefaultBannedRights | messages.GetEmojiKeywords | messages.GetEmojiKeywordsDifference | messages.GetEmojiKeywordsLanguages | messages.GetEmojiURL | messages.GetSearchCounters | messages.RequestUrlAuth | messages.AcceptUrlAuth | messages.HidePeerSettingsBar | messages.GetScheduledHistory | messages.GetScheduledMessages | messages.SendScheduledMessages | messages.DeleteScheduledMessages | messages.GetPollVotes | messages.ToggleStickerSets | messages.GetDialogFilters | messages.GetSuggestedDialogFilters | messages.UpdateDialogFilter | messages.UpdateDialogFiltersOrder | messages.GetOldFeaturedStickers | messages.GetReplies | messages.GetDiscussionMessage | messages.ReadDiscussion | messages.UnpinAllMessages | messages.DeleteChat | messages.DeletePhoneCallHistory | messages.CheckHistoryImport | messages.InitHistoryImport | messages.UploadImportedMedia | messages.StartHistoryImport | messages.GetExportedChatInvites | messages.GetExportedChatInvite | messages.EditExportedChatInvite | messages.DeleteRevokedExportedChatInvites | messages.DeleteExportedChatInvite | messages.GetAdminsWithInvites | messages.GetChatInviteImporters | messages.SetHistoryTTL | messages.CheckHistoryImportPeer | messages.SetChatTheme | messages.GetMessageReadParticipants | messages.GetSearchResultsCalendar | messages.GetSearchResultsPositions | messages.HideChatJoinRequest | messages.HideAllChatJoinRequests | messages.ToggleNoForwards | messages.SaveDefaultSendAs | messages.SendReaction | messages.GetMessagesReactions | messages.GetMessageReactionsList | messages.SetChatAvailableReactions | messages.GetAvailableReactions | messages.SetDefaultReaction | messages.TranslateText | messages.GetUnreadReactions | messages.ReadReactions | messages.SearchSentMedia | messages.GetAttachMenuBots | messages.GetAttachMenuBot | messages.ToggleBotInAttachMenu | messages.RequestWebView | messages.ProlongWebView | messages.RequestSimpleWebView | messages.SendWebViewResultMessage | messages.SendWebViewData | messages.TranscribeAudio | messages.RateTranscribedAudio
| messages.GetMessages | messages.GetDialogs | messages.GetHistory | messages.Search | messages.ReadHistory | messages.DeleteHistory | messages.DeleteMessages | messages.ReceivedMessages | messages.SetTyping | messages.SendMessage | messages.SendMedia | messages.ForwardMessages | messages.ReportSpam | messages.GetPeerSettings | messages.Report | messages.GetChats | messages.GetFullChat | messages.EditChatTitle | messages.EditChatPhoto | messages.AddChatUser | messages.DeleteChatUser | messages.CreateChat | messages.GetDhConfig | messages.RequestEncryption | messages.AcceptEncryption | messages.DiscardEncryption | messages.SetEncryptedTyping | messages.ReadEncryptedHistory | messages.SendEncrypted | messages.SendEncryptedFile | messages.SendEncryptedService | messages.ReceivedQueue | messages.ReportEncryptedSpam | messages.ReadMessageContents | messages.GetStickers | messages.GetAllStickers | messages.GetWebPagePreview | messages.ExportChatInvite | messages.CheckChatInvite | messages.ImportChatInvite | messages.GetStickerSet | messages.InstallStickerSet | messages.UninstallStickerSet | messages.StartBot | messages.GetMessagesViews | messages.EditChatAdmin | messages.MigrateChat | messages.SearchGlobal | messages.ReorderStickerSets | messages.GetDocumentByHash | messages.GetSavedGifs | messages.SaveGif | messages.GetInlineBotResults | messages.SetInlineBotResults | messages.SendInlineBotResult | messages.GetMessageEditData | messages.EditMessage | messages.EditInlineBotMessage | messages.GetBotCallbackAnswer | messages.SetBotCallbackAnswer | messages.GetPeerDialogs | messages.SaveDraft | messages.GetAllDrafts | messages.GetFeaturedStickers | messages.ReadFeaturedStickers | messages.GetRecentStickers | messages.SaveRecentSticker | messages.ClearRecentStickers | messages.GetArchivedStickers | messages.GetMaskStickers | messages.GetAttachedStickers | messages.SetGameScore | messages.SetInlineGameScore | messages.GetGameHighScores | messages.GetInlineGameHighScores | messages.GetCommonChats | messages.GetAllChats | messages.GetWebPage | messages.ToggleDialogPin | messages.ReorderPinnedDialogs | messages.GetPinnedDialogs | messages.SetBotShippingResults | messages.SetBotPrecheckoutResults | messages.UploadMedia | messages.SendScreenshotNotification | messages.GetFavedStickers | messages.FaveSticker | messages.GetUnreadMentions | messages.ReadMentions | messages.GetRecentLocations | messages.SendMultiMedia | messages.UploadEncryptedFile | messages.SearchStickerSets | messages.GetSplitRanges | messages.MarkDialogUnread | messages.GetDialogUnreadMarks | messages.ClearAllDrafts | messages.UpdatePinnedMessage | messages.SendVote | messages.GetPollResults | messages.GetOnlines | messages.EditChatAbout | messages.EditChatDefaultBannedRights | messages.GetEmojiKeywords | messages.GetEmojiKeywordsDifference | messages.GetEmojiKeywordsLanguages | messages.GetEmojiURL | messages.GetSearchCounters | messages.RequestUrlAuth | messages.AcceptUrlAuth | messages.HidePeerSettingsBar | messages.GetScheduledHistory | messages.GetScheduledMessages | messages.SendScheduledMessages | messages.DeleteScheduledMessages | messages.GetPollVotes | messages.ToggleStickerSets | messages.GetDialogFilters | messages.GetSuggestedDialogFilters | messages.UpdateDialogFilter | messages.UpdateDialogFiltersOrder | messages.GetOldFeaturedStickers | messages.GetReplies | messages.GetDiscussionMessage | messages.ReadDiscussion | messages.UnpinAllMessages | messages.DeleteChat | messages.DeletePhoneCallHistory | messages.CheckHistoryImport | messages.InitHistoryImport | messages.UploadImportedMedia | messages.StartHistoryImport | messages.GetExportedChatInvites | messages.GetExportedChatInvite | messages.EditExportedChatInvite | messages.DeleteRevokedExportedChatInvites | messages.DeleteExportedChatInvite | messages.GetAdminsWithInvites | messages.GetChatInviteImporters | messages.SetHistoryTTL | messages.CheckHistoryImportPeer | messages.SetChatTheme | messages.GetMessageReadParticipants | messages.GetSearchResultsCalendar | messages.GetSearchResultsPositions | messages.HideChatJoinRequest | messages.HideAllChatJoinRequests | messages.ToggleNoForwards | messages.SaveDefaultSendAs | messages.SendReaction | messages.GetMessagesReactions | messages.GetMessageReactionsList | messages.SetChatAvailableReactions | messages.GetAvailableReactions | messages.SetDefaultReaction | messages.TranslateText | messages.GetUnreadReactions | messages.ReadReactions | messages.SearchSentMedia | messages.GetAttachMenuBots | messages.GetAttachMenuBot | messages.ToggleBotInAttachMenu | messages.RequestWebView | messages.ProlongWebView | messages.RequestSimpleWebView | messages.SendWebViewResultMessage | messages.SendWebViewData | messages.TranscribeAudio | messages.RateTranscribedAudio | messages.GetCustomEmojiDocuments | messages.GetEmojiStickers | messages.GetFeaturedEmojiStickers
| updates.GetState | updates.GetDifference | updates.GetChannelDifference
| photos.UpdateProfilePhoto | photos.UploadProfilePhoto | photos.DeletePhotos | photos.GetUserPhotos
| upload.SaveFilePart | upload.GetFile | upload.SaveBigFilePart | upload.GetWebFile | upload.GetCdnFile | upload.ReuploadCdnFile | upload.GetCdnFileHashes | upload.GetFileHashes
| help.GetConfig | help.GetNearestDc | help.GetAppUpdate | help.GetInviteText | help.GetSupport | help.GetAppChangelog | help.SetBotUpdatesStatus | help.GetCdnConfig | help.GetRecentMeUrls | help.GetTermsOfServiceUpdate | help.AcceptTermsOfService | help.GetDeepLinkInfo | help.GetAppConfig | help.SaveAppLog | help.GetPassportConfig | help.GetSupportName | help.GetUserInfo | help.EditUserInfo | help.GetPromoData | help.HidePromoData | help.DismissSuggestion | help.GetCountriesList | help.GetPremiumPromo
| channels.ReadHistory | channels.DeleteMessages | channels.ReportSpam | channels.GetMessages | channels.GetParticipants | channels.GetParticipant | channels.GetChannels | channels.GetFullChannel | channels.CreateChannel | channels.EditAdmin | channels.EditTitle | channels.EditPhoto | channels.CheckUsername | channels.UpdateUsername | channels.JoinChannel | channels.LeaveChannel | channels.InviteToChannel | channels.DeleteChannel | channels.ExportMessageLink | channels.ToggleSignatures | channels.GetAdminedPublicChannels | channels.EditBanned | channels.GetAdminLog | channels.SetStickers | channels.ReadMessageContents | channels.DeleteHistory | channels.TogglePreHistoryHidden | channels.GetLeftChannels | channels.GetGroupsForDiscussion | channels.SetDiscussionGroup | channels.EditCreator | channels.EditLocation | channels.ToggleSlowMode | channels.GetInactiveChannels | channels.ConvertToGigagroup | channels.ViewSponsoredMessage | channels.GetSponsoredMessages | channels.GetSendAs | channels.DeleteParticipantHistory | channels.ToggleJoinToSend | channels.ToggleJoinRequest
| bots.SendCustomRequest | bots.AnswerWebhookJSONQuery | bots.SetBotCommands | bots.ResetBotCommands | bots.GetBotCommands | bots.SetBotMenuButton | bots.GetBotMenuButton | bots.SetBotBroadcastDefaultAdminRights | bots.SetBotGroupDefaultAdminRights
| payments.GetPaymentForm | payments.GetPaymentReceipt | payments.ValidateRequestedInfo | payments.SendPaymentForm | payments.GetSavedInfo | payments.ClearSavedInfo | payments.GetBankCardData | payments.ExportInvoice | payments.AssignAppStoreTransaction | payments.AssignPlayMarketTransaction | payments.RestorePlayMarketReceipt | payments.CanPurchasePremium | payments.RequestRecurringPayment
| payments.GetPaymentForm | payments.GetPaymentReceipt | payments.ValidateRequestedInfo | payments.SendPaymentForm | payments.GetSavedInfo | payments.ClearSavedInfo | payments.GetBankCardData | payments.ExportInvoice | payments.AssignAppStoreTransaction | payments.AssignPlayMarketTransaction | payments.CanPurchasePremium | payments.RequestRecurringPayment
| stickers.CreateStickerSet | stickers.RemoveStickerFromSet | stickers.ChangeStickerPosition | stickers.AddStickerToSet | stickers.SetStickerSetThumb | stickers.CheckShortName | stickers.SuggestShortName
| phone.GetCallConfig | phone.RequestCall | phone.AcceptCall | phone.ConfirmCall | phone.ReceivedCall | phone.DiscardCall | phone.SetCallRating | phone.SaveCallDebug | phone.SendSignalingData | phone.CreateGroupCall | phone.JoinGroupCall | phone.LeaveGroupCall | phone.InviteToGroupCall | phone.DiscardGroupCall | phone.ToggleGroupCallSettings | phone.GetGroupCall | phone.GetGroupParticipants | phone.CheckGroupCall | phone.ToggleGroupCallRecord | phone.EditGroupCallParticipant | phone.EditGroupCallTitle | phone.GetGroupCallJoinAs | phone.ExportGroupCallInvite | phone.ToggleGroupCallStartSubscription | phone.StartScheduledGroupCall | phone.SaveDefaultGroupCallJoinAs | phone.JoinGroupCallPresentation | phone.LeaveGroupCallPresentation | phone.GetGroupCallStreamChannels | phone.GetGroupCallStreamRtmpUrl | phone.SaveCallLog
| langpack.GetLangPack | langpack.GetStrings | langpack.GetDifference | langpack.GetLanguages | langpack.GetLanguage

View File

@ -135,6 +135,7 @@ messageActionSetChatTheme#aa786345 emoticon:string = MessageAction;
messageActionChatJoinedByRequest#ebbca3cb = MessageAction;
messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction;
messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction;
messageActionGiftPremium#aba0f5c6 currency:string amount:long months:int = MessageAction;
dialog#a8edd0f5 flags:# pinned:flags.2?true unread_mark:flags.3?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int = Dialog;
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
photoEmpty#2331b22d id:long = Photo;
@ -170,7 +171,7 @@ inputReportReasonGeoIrrelevant#dbd4feed = ReportReason;
inputReportReasonFake#f5ddd6e7 = ReportReason;
inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason;
userFull#8c72ea81 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true id:long about:flags.1?string settings:PeerSettings profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights = UserFull;
userFull#c4b1fc3f flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true voice_messages_forbidden:flags.20?true id:long about:flags.1?string settings:PeerSettings profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights premium_gifts:flags.19?Vector<PremiumGiftOption> = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact;
importedContact#c13e3c50 user_id:long client_id:long = ImportedContact;
contactStatus#16d9703b user_id:long status:UserStatus = ContactStatus;
@ -239,7 +240,7 @@ updateDeleteChannelMessages#c32d5b12 channel_id:long messages:Vector<int> pts:in
updateChannelMessageViews#f226ac08 channel_id:long id:int views:int = Update;
updateChatParticipantAdmin#d7ca61a2 chat_id:long user_id:long is_admin:Bool version:int = Update;
updateNewStickerSet#688a30aa stickerset:messages.StickerSet = Update;
updateStickerSetsOrder#bb2d201 flags:# masks:flags.0?true order:Vector<long> = Update;
updateStickerSetsOrder#bb2d201 flags:# masks:flags.0?true emojis:flags.1?true order:Vector<long> = Update;
updateStickerSets#43ae3dec = Update;
updateSavedGifs#9375341e = Update;
updateBotInlineQuery#496f379c flags:# query_id:long user_id:long query:string geo:flags.0?GeoPoint peer_type:flags.1?InlineQueryPeerType offset:string = Update;
@ -308,6 +309,7 @@ updateWebViewResultSent#1592b79d query_id:long = Update;
updateBotMenuButton#14b85813 bot_id:long button:BotMenuButton = Update;
updateSavedRingtones#74d8be99 = Update;
updateTranscribedAudio#84cd5a flags:# pending:flags.0?true peer:Peer msg_id:int transcription_id:long text:string = Update;
updateReadFeaturedEmojiStickers#fb4c496c = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
updates.differenceEmpty#5d75a138 date:int seq:int = updates.Difference;
updates.difference#f49ca0 new_messages:Vector<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> state:updates.State = updates.Difference;
@ -385,6 +387,7 @@ inputPrivacyKeyForwards#a4dd4c08 = InputPrivacyKey;
inputPrivacyKeyProfilePhoto#5719bacc = InputPrivacyKey;
inputPrivacyKeyPhoneNumber#352dafa = InputPrivacyKey;
inputPrivacyKeyAddedByPhone#d1219bdd = InputPrivacyKey;
inputPrivacyKeyVoiceMessages#aee69d68 = InputPrivacyKey;
privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
privacyKeyChatInvite#500e6dfa = PrivacyKey;
privacyKeyPhoneCall#3d662b7b = PrivacyKey;
@ -393,6 +396,7 @@ privacyKeyForwards#69ec56a3 = PrivacyKey;
privacyKeyProfilePhoto#96151fed = PrivacyKey;
privacyKeyPhoneNumber#d19ae46d = PrivacyKey;
privacyKeyAddedByPhone#42ffd42b = PrivacyKey;
privacyKeyVoiceMessages#697f414 = PrivacyKey;
inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;
inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;
inputPrivacyValueAllowUsers#131cc67f users:Vector<InputUser> = InputPrivacyRule;
@ -418,6 +422,7 @@ documentAttributeVideo#ef02ce6 flags:# round_message:flags.0?true supports_strea
documentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute;
documentAttributeFilename#15590068 file_name:string = DocumentAttribute;
documentAttributeHasStickers#9801d2f7 = DocumentAttribute;
documentAttributeCustomEmoji#fd149899 flags:# free:flags.0?true alt:string stickerset:InputStickerSet = DocumentAttribute;
messages.stickersNotModified#f1749a22 = messages.Stickers;
messages.stickers#30a6ec7e hash:long stickers:Vector<Document> = messages.Stickers;
stickerPack#12b299d4 emoticon:string documents:Vector<long> = StickerPack;
@ -446,7 +451,8 @@ inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
inputStickerSetAnimatedEmoji#28703c8 = InputStickerSet;
inputStickerSetDice#e67f520e emoticon:string = InputStickerSet;
inputStickerSetAnimatedEmojiAnimations#cde3739 = InputStickerSet;
stickerSet#d7df217a flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true videos:flags.6?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int count:int hash:int = StickerSet;
inputStickerSetPremiumGifts#c88b3b02 = InputStickerSet;
stickerSet#2dd14edc flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true videos:flags.6?true emojis:flags.7?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int thumb_document_id:flags.8?long count:int hash:int = StickerSet;
messages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = messages.StickerSet;
messages.stickerSetNotModified#d3f924eb = messages.StickerSet;
botCommand#c27ac8c7 command:string description:string = BotCommand;
@ -491,6 +497,7 @@ messageEntityStrike#bf0693d4 offset:int length:int = MessageEntity;
messageEntityBlockquote#20df5d0 offset:int length:int = MessageEntity;
messageEntityBankCard#761e6af4 offset:int length:int = MessageEntity;
messageEntitySpoiler#32ca960f offset:int length:int = MessageEntity;
messageEntityCustomEmoji#c8cf05f8 offset:int length:int document_id:long = MessageEntity;
inputChannelEmpty#ee8c1e86 = InputChannel;
inputChannel#f35aec28 channel_id:long access_hash:long = InputChannel;
inputChannelFromMessage#5b934f9d peer:InputPeer msg_id:int channel_id:long = InputChannel;
@ -582,6 +589,7 @@ messages.stickerSetInstallResultSuccess#38641628 = messages.StickerSetInstallRes
messages.stickerSetInstallResultArchive#35e410a8 sets:Vector<StickerSetCovered> = messages.StickerSetInstallResult;
stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered;
stickerSetMultiCovered#3407e51b set:StickerSet covers:Vector<Document> = StickerSetCovered;
stickerSetFullCovered#1aed5ee5 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = StickerSetCovered;
maskCoords#aed6dbb2 n:int x:double y:double zoom:double = MaskCoords;
inputStickeredMediaPhoto#4a992157 id:InputPhoto = InputStickeredMedia;
inputStickeredMediaDocument#438865b id:InputDocument = InputStickeredMedia;
@ -651,8 +659,9 @@ webDocumentNoProxy#f9c8bcc6 url:string size:int mime_type:string attributes:Vect
inputWebDocument#9bed434d url:string size:int mime_type:string attributes:Vector<DocumentAttribute> = InputWebDocument;
inputWebFileLocation#c239d686 url:string access_hash:long = InputWebFileLocation;
inputWebFileGeoPointLocation#9f2221c9 geo_point:InputGeoPoint access_hash:long w:int h:int zoom:int scale:int = InputWebFileLocation;
inputWebFileAudioAlbumThumbLocation#f46fe924 flags:# document:flags.0?InputDocument title:flags.1?string performer:flags.1?string = InputWebFileLocation;
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
payments.paymentForm#b0133b37 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?PaymentSavedCredentials users:Vector<User> = payments.PaymentForm;
payments.paymentForm#a0058751 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON additional_methods:flags.6?Vector<PaymentFormMethod> saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?Vector<PaymentSavedCredentials> users:Vector<User> = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo;
payments.paymentResult#4e5f810d updates:Updates = payments.PaymentResult;
payments.paymentVerificationNeeded#d8411139 url:string = payments.PaymentResult;
@ -998,6 +1007,10 @@ inputInvoiceSlug#c326caef slug:string = InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
messages.transcribedAudio#93752c52 flags:# pending:flags.0?true transcription_id:long text:string = messages.TranscribedAudio;
help.premiumPromo#8a4f3c29 status_text:string status_entities:Vector<MessageEntity> video_sections:Vector<string> videos:Vector<Document> currency:string monthly_amount:long users:Vector<User> = help.PremiumPromo;
inputStorePaymentPremiumSubscription#a6751e66 flags:# restore:flags.0?true = InputStorePaymentPurpose;
inputStorePaymentGiftPremium#616f7fe8 user_id:InputUser currency:string amount:long = InputStorePaymentPurpose;
premiumGiftOption#74c34319 flags:# months:int currency:string amount:long bot_url:string store_product:flags.0?string = PremiumGiftOption;
paymentFormMethod#88f8f21b url:string title:string = PaymentFormMethod;
---functions---
initConnection#c1cd5ea9 {X:Type} flags:# api_id:int device_model:string system_version:string app_version:string system_lang_code:string lang_pack:string lang_code:string proxy:flags.0?InputClientProxy params:flags.1?JSONValue query:!X = X;
invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;

View File

@ -161,6 +161,7 @@ messageActionSetChatTheme#aa786345 emoticon:string = MessageAction;
messageActionChatJoinedByRequest#ebbca3cb = MessageAction;
messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction;
messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction;
messageActionGiftPremium#aba0f5c6 currency:string amount:long months:int = MessageAction;
dialog#a8edd0f5 flags:# pinned:flags.2?true unread_mark:flags.3?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int = Dialog;
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
@ -210,7 +211,7 @@ inputReportReasonFake#f5ddd6e7 = ReportReason;
inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason;
userFull#8c72ea81 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true id:long about:flags.1?string settings:PeerSettings profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights = UserFull;
userFull#c4b1fc3f flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true voice_messages_forbidden:flags.20?true id:long about:flags.1?string settings:PeerSettings profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights premium_gifts:flags.19?Vector<PremiumGiftOption> = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact;
@ -292,7 +293,7 @@ updateDeleteChannelMessages#c32d5b12 channel_id:long messages:Vector<int> pts:in
updateChannelMessageViews#f226ac08 channel_id:long id:int views:int = Update;
updateChatParticipantAdmin#d7ca61a2 chat_id:long user_id:long is_admin:Bool version:int = Update;
updateNewStickerSet#688a30aa stickerset:messages.StickerSet = Update;
updateStickerSetsOrder#bb2d201 flags:# masks:flags.0?true order:Vector<long> = Update;
updateStickerSetsOrder#bb2d201 flags:# masks:flags.0?true emojis:flags.1?true order:Vector<long> = Update;
updateStickerSets#43ae3dec = Update;
updateSavedGifs#9375341e = Update;
updateBotInlineQuery#496f379c flags:# query_id:long user_id:long query:string geo:flags.0?GeoPoint peer_type:flags.1?InlineQueryPeerType offset:string = Update;
@ -361,6 +362,7 @@ updateWebViewResultSent#1592b79d query_id:long = Update;
updateBotMenuButton#14b85813 bot_id:long button:BotMenuButton = Update;
updateSavedRingtones#74d8be99 = Update;
updateTranscribedAudio#84cd5a flags:# pending:flags.0?true peer:Peer msg_id:int transcription_id:long text:string = Update;
updateReadFeaturedEmojiStickers#fb4c496c = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
@ -463,6 +465,7 @@ inputPrivacyKeyForwards#a4dd4c08 = InputPrivacyKey;
inputPrivacyKeyProfilePhoto#5719bacc = InputPrivacyKey;
inputPrivacyKeyPhoneNumber#352dafa = InputPrivacyKey;
inputPrivacyKeyAddedByPhone#d1219bdd = InputPrivacyKey;
inputPrivacyKeyVoiceMessages#aee69d68 = InputPrivacyKey;
privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
privacyKeyChatInvite#500e6dfa = PrivacyKey;
@ -472,6 +475,7 @@ privacyKeyForwards#69ec56a3 = PrivacyKey;
privacyKeyProfilePhoto#96151fed = PrivacyKey;
privacyKeyPhoneNumber#d19ae46d = PrivacyKey;
privacyKeyAddedByPhone#42ffd42b = PrivacyKey;
privacyKeyVoiceMessages#697f414 = PrivacyKey;
inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;
inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;
@ -502,6 +506,7 @@ documentAttributeVideo#ef02ce6 flags:# round_message:flags.0?true supports_strea
documentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute;
documentAttributeFilename#15590068 file_name:string = DocumentAttribute;
documentAttributeHasStickers#9801d2f7 = DocumentAttribute;
documentAttributeCustomEmoji#fd149899 flags:# free:flags.0?true alt:string stickerset:InputStickerSet = DocumentAttribute;
messages.stickersNotModified#f1749a22 = messages.Stickers;
messages.stickers#30a6ec7e hash:long stickers:Vector<Document> = messages.Stickers;
@ -545,8 +550,9 @@ inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
inputStickerSetAnimatedEmoji#28703c8 = InputStickerSet;
inputStickerSetDice#e67f520e emoticon:string = InputStickerSet;
inputStickerSetAnimatedEmojiAnimations#cde3739 = InputStickerSet;
inputStickerSetPremiumGifts#c88b3b02 = InputStickerSet;
stickerSet#d7df217a flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true videos:flags.6?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int count:int hash:int = StickerSet;
stickerSet#2dd14edc flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true videos:flags.6?true emojis:flags.7?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int thumb_document_id:flags.8?long count:int hash:int = StickerSet;
messages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = messages.StickerSet;
messages.stickerSetNotModified#d3f924eb = messages.StickerSet;
@ -598,6 +604,7 @@ messageEntityStrike#bf0693d4 offset:int length:int = MessageEntity;
messageEntityBlockquote#20df5d0 offset:int length:int = MessageEntity;
messageEntityBankCard#761e6af4 offset:int length:int = MessageEntity;
messageEntitySpoiler#32ca960f offset:int length:int = MessageEntity;
messageEntityCustomEmoji#c8cf05f8 offset:int length:int document_id:long = MessageEntity;
inputChannelEmpty#ee8c1e86 = InputChannel;
inputChannel#f35aec28 channel_id:long access_hash:long = InputChannel;
@ -724,6 +731,7 @@ messages.stickerSetInstallResultArchive#35e410a8 sets:Vector<StickerSetCovered>
stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered;
stickerSetMultiCovered#3407e51b set:StickerSet covers:Vector<Document> = StickerSetCovered;
stickerSetFullCovered#1aed5ee5 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = StickerSetCovered;
maskCoords#aed6dbb2 n:int x:double y:double zoom:double = MaskCoords;
@ -812,10 +820,11 @@ inputWebDocument#9bed434d url:string size:int mime_type:string attributes:Vector
inputWebFileLocation#c239d686 url:string access_hash:long = InputWebFileLocation;
inputWebFileGeoPointLocation#9f2221c9 geo_point:InputGeoPoint access_hash:long w:int h:int zoom:int scale:int = InputWebFileLocation;
inputWebFileAudioAlbumThumbLocation#f46fe924 flags:# document:flags.0?InputDocument title:flags.1?string performer:flags.1?string = InputWebFileLocation;
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
payments.paymentForm#b0133b37 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?PaymentSavedCredentials users:Vector<User> = payments.PaymentForm;
payments.paymentForm#a0058751 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON additional_methods:flags.6?Vector<PaymentFormMethod> saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?Vector<PaymentSavedCredentials> users:Vector<User> = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo;
@ -1357,6 +1366,13 @@ messages.transcribedAudio#93752c52 flags:# pending:flags.0?true transcription_id
help.premiumPromo#8a4f3c29 status_text:string status_entities:Vector<MessageEntity> video_sections:Vector<string> videos:Vector<Document> currency:string monthly_amount:long users:Vector<User> = help.PremiumPromo;
inputStorePaymentPremiumSubscription#a6751e66 flags:# restore:flags.0?true = InputStorePaymentPurpose;
inputStorePaymentGiftPremium#616f7fe8 user_id:InputUser currency:string amount:long = InputStorePaymentPurpose;
premiumGiftOption#74c34319 flags:# months:int currency:string amount:long bot_url:string store_product:flags.0?string = PremiumGiftOption;
paymentFormMethod#88f8f21b url:string title:string = PaymentFormMethod;
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@ -1400,7 +1416,7 @@ account.checkUsername#2714d86c username:string = Bool;
account.updateUsername#3e0bdd7c username:string = User;
account.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules;
account.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector<InputPrivacyRule> = account.PrivacyRules;
account.deleteAccount#418d4e0b reason:string = Bool;
account.deleteAccount#a2c0cf74 flags:# reason:string password:flags.0?InputCheckPasswordSRP = Bool;
account.getAccountTTL#8fc711d = AccountDaysTTL;
account.setAccountTTL#2442485e ttl:AccountDaysTTL = Bool;
account.sendChangePhoneCode#82574ae5 phone_number:string settings:CodeSettings = auth.SentCode;
@ -1538,7 +1554,7 @@ messages.getMessagesViews#5784d3e1 peer:InputPeer id:Vector<int> increment:Bool
messages.editChatAdmin#a85bd1c2 chat_id:long user_id:InputUser is_admin:Bool = Bool;
messages.migrateChat#a2875319 chat_id:long = Updates;
messages.searchGlobal#4bc6589a flags:# folder_id:flags.0?int q:string filter:MessagesFilter min_date:int max_date:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
messages.reorderStickerSets#78337739 flags:# masks:flags.0?true order:Vector<long> = Bool;
messages.reorderStickerSets#78337739 flags:# masks:flags.0?true emojis:flags.1?true order:Vector<long> = Bool;
messages.getDocumentByHash#b1f2061f sha256:bytes size:long mime_type:string = Document;
messages.getSavedGifs#5cf09635 hash:long = messages.SavedGifs;
messages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool;
@ -1558,7 +1574,7 @@ messages.readFeaturedStickers#5b118126 id:Vector<long> = Bool;
messages.getRecentStickers#9da9403b flags:# attached:flags.0?true hash:long = messages.RecentStickers;
messages.saveRecentSticker#392718f8 flags:# attached:flags.0?true id:InputDocument unsave:Bool = Bool;
messages.clearRecentStickers#8999602d flags:# attached:flags.0?true = Bool;
messages.getArchivedStickers#57f17692 flags:# masks:flags.0?true offset_id:long limit:int = messages.ArchivedStickers;
messages.getArchivedStickers#57f17692 flags:# masks:flags.0?true emojis:flags.1?true offset_id:long limit:int = messages.ArchivedStickers;
messages.getMaskStickers#640f82b8 hash:long = messages.AllStickers;
messages.getAttachedStickers#cc5b67cc media:InputStickeredMedia = Vector<StickerSetCovered>;
messages.setGameScore#8ef8ecc0 flags:# edit_message:flags.0?true force:flags.1?true peer:InputPeer id:int user_id:InputUser score:int = Updates;
@ -1659,6 +1675,9 @@ messages.sendWebViewResultMessage#a4314f5 bot_query_id:string result:InputBotInl
messages.sendWebViewData#dc0242c8 bot:InputUser random_id:long button_text:string data:string = Updates;
messages.transcribeAudio#269e9a49 peer:InputPeer msg_id:int = messages.TranscribedAudio;
messages.rateTranscribedAudio#7f1d072f peer:InputPeer msg_id:int transcription_id:long good:Bool = Bool;
messages.getCustomEmojiDocuments#d9ab0f54 document_id:Vector<long> = Vector<Document>;
messages.getEmojiStickers#fbfca18f hash:long = messages.AllStickers;
messages.getFeaturedEmojiStickers#ecf6736 hash:long = messages.FeaturedStickers;
updates.getState#edd4882a = updates.State;
updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference;
@ -1762,10 +1781,9 @@ payments.getSavedInfo#227d824b = payments.SavedInfo;
payments.clearSavedInfo#d83d70c1 flags:# credentials:flags.0?true info:flags.1?true = Bool;
payments.getBankCardData#2e79d779 number:string = payments.BankCardData;
payments.exportInvoice#f91b065 invoice_media:InputMedia = payments.ExportedInvoice;
payments.assignAppStoreTransaction#fec13c6 flags:# restore:flags.0?true transaction_id:string receipt:bytes = Updates;
payments.assignPlayMarketTransaction#4faa4aed purchase_token:string = Updates;
payments.restorePlayMarketReceipt#d164e36a receipt:bytes = Updates;
payments.canPurchasePremium#aa6a90c8 = Bool;
payments.assignAppStoreTransaction#80ed747d receipt:bytes purpose:InputStorePaymentPurpose = Updates;
payments.assignPlayMarketTransaction#dffd50d3 receipt:DataJSON purpose:InputStorePaymentPurpose = Updates;
payments.canPurchasePremium#9fc19eb6 purpose:InputStorePaymentPurpose = Bool;
payments.requestRecurringPayment#146e958d user_id:InputUser recurring_init_charge:string invoice_media:InputMedia = Updates;
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true animated:flags.1?true videos:flags.4?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector<InputStickerSetItem> software:flags.3?string = messages.StickerSet;

View File

@ -1,8 +1,9 @@
import { getActions } from '../global';
import { IS_SAFARI } from './environment';
type DeepLinkMethod = 'resolve' | 'login' | 'passport' | 'settings' | 'join' | 'addstickers' | 'setlanguage' |
'addtheme' | 'confirmphone' | 'socks' | 'proxy' | 'privatepost' | 'bg' | 'share' | 'msg' | 'msg_url' | 'invoice';
type DeepLinkMethod = 'resolve' | 'login' | 'passport' | 'settings' | 'join' | 'addstickers' | 'addemoji' |
'setlanguage' | 'addtheme' | 'confirmphone' | 'socks' | 'proxy' | 'privatepost' | 'bg' | 'share' | 'msg' | 'msg_url' |
'invoice';
export const processDeepLink = (url: string) => {
const {
@ -80,6 +81,7 @@ export const processDeepLink = (url: string) => {
openChatByInvite({ hash: invite });
break;
}
case 'addemoji':
case 'addstickers': {
const { set } = params;