From b69e2b8d0fcc208181e59614bf1f609abccd5427 Mon Sep 17 00:00:00 2001
From: Alexander Zinchuk
Date: Fri, 19 Apr 2024 13:37:58 +0400
Subject: [PATCH] Various features from Layer 177 (#4447)
---
src/api/gramjs/apiBuilders/appConfig.ts | 2 +
src/api/gramjs/apiBuilders/business.ts | 42 ++
src/api/gramjs/apiBuilders/chats.ts | 11 +
src/api/gramjs/apiBuilders/common.ts | 4 +
src/api/gramjs/apiBuilders/messages.ts | 3 +-
src/api/gramjs/apiBuilders/symbols.ts | 26 +-
src/api/gramjs/apiBuilders/users.ts | 35 +-
src/api/gramjs/gramjsBuilders/index.ts | 3 +
src/api/gramjs/methods/chats.ts | 143 +---
src/api/gramjs/methods/media.ts | 8 +-
src/api/gramjs/methods/messages.ts | 11 +
src/api/gramjs/methods/payments.ts | 6 +-
src/api/gramjs/methods/users.ts | 17 +-
src/api/types/business.ts | 22 +
src/api/types/chats.ts | 6 +
src/api/types/index.ts | 1 +
src/api/types/messages.ts | 6 +-
src/api/types/misc.ts | 1 +
src/api/types/users.ts | 21 +-
src/components/common/ChatExtra.module.scss | 38 +
src/components/common/ChatExtra.tsx | 33 +-
src/components/common/PrivateChatInfo.tsx | 8 +-
src/components/common/ProfileInfo.tsx | 12 +-
src/components/left/main/Chat.scss | 12 +-
src/components/left/main/Chat.tsx | 51 +-
.../left/main/hooks/useChatListEntry.tsx | 9 +-
.../left/settings/PrivacyMessages.tsx | 18 +-
src/components/left/settings/Settings.scss | 9 -
.../left/settings/SettingsPrivacy.tsx | 26 +-
...eting.scss => ContactGreeting.module.scss} | 16 +-
src/components/middle/ContactGreeting.tsx | 63 +-
.../composer/StickerSetCover.module.scss | 2 +
.../middle/composer/StickerSetCover.tsx | 22 +-
src/components/middle/message/MentionLink.tsx | 11 +
src/components/middle/message/Message.tsx | 11 +-
.../modals/webApp/hooks/useWebAppFrame.ts | 9 +
src/components/right/Profile.scss | 9 -
src/components/right/RightColumn.tsx | 15 +-
src/config.ts | 4 +-
src/global/actions/api/chats.ts | 9 +-
src/global/actions/api/settings.ts | 1 +
src/global/actions/api/users.ts | 4 +
src/global/actions/ui/misc.ts | 7 +
src/global/helpers/misc.ts | 3 +
src/global/types.ts | 4 +
src/hooks/useChatContextActions.ts | 5 +-
src/lib/gramjs/errors/RPCErrorList.js | 9 +
src/lib/gramjs/tl/AllTLObjects.js | 2 +-
src/lib/gramjs/tl/api.d.ts | 657 +++++++++++++++++-
src/lib/gramjs/tl/apiTl.js | 71 +-
src/lib/gramjs/tl/static/api.json | 1 +
src/lib/gramjs/tl/static/api.tl | 122 +++-
src/types/index.ts | 6 +-
src/types/webapp.ts | 216 +++---
54 files changed, 1402 insertions(+), 461 deletions(-)
create mode 100644 src/api/gramjs/apiBuilders/business.ts
create mode 100644 src/api/types/business.ts
create mode 100644 src/components/common/ChatExtra.module.scss
rename src/components/middle/{ContactGreeting.scss => ContactGreeting.module.scss} (69%)
diff --git a/src/api/gramjs/apiBuilders/appConfig.ts b/src/api/gramjs/apiBuilders/appConfig.ts
index 5921916e9..39aa539b4 100644
--- a/src/api/gramjs/apiBuilders/appConfig.ts
+++ b/src/api/gramjs/apiBuilders/appConfig.ts
@@ -72,6 +72,7 @@ export interface GramJsAppConfig extends LimitsConfig {
stories_changelog_user_id?: number;
// Boosts
group_transcribe_level_min?: number;
+ new_noncontact_peers_require_premium_without_ownpremium?: boolean;
}
function buildEmojiSounds(appConfig: GramJsAppConfig) {
@@ -145,5 +146,6 @@ export function buildAppConfig(json: GramJs.TypeJSONValue, hash: number): ApiApp
storyViewersExpirePeriod: appConfig.story_viewers_expire_period ?? STORY_VIEWERS_EXPIRE_PERIOD,
storyChangelogUserId: appConfig.stories_changelog_user_id?.toString() ?? SERVICE_NOTIFICATIONS_USER_ID,
groupTranscribeLevelMin: appConfig.group_transcribe_level_min,
+ canLimitNewMessagesWithoutPremium: appConfig.new_noncontact_peers_require_premium_without_ownpremium,
};
}
diff --git a/src/api/gramjs/apiBuilders/business.ts b/src/api/gramjs/apiBuilders/business.ts
new file mode 100644
index 000000000..65e1ec2b5
--- /dev/null
+++ b/src/api/gramjs/apiBuilders/business.ts
@@ -0,0 +1,42 @@
+import type { Api as GramJs } from '../../../lib/gramjs';
+import type { ApiBusinessIntro, ApiBusinessLocation, ApiBusinessWorkHours } from '../../types';
+
+import { buildGeoPoint } from './messageContent';
+import { buildStickerFromDocument } from './symbols';
+
+export function buildApiBusinessLocation(location: GramJs.TypeBusinessLocation): ApiBusinessLocation {
+ const {
+ address, geoPoint,
+ } = location;
+
+ return {
+ address,
+ geo: geoPoint && buildGeoPoint(geoPoint),
+ };
+}
+
+export function buildApiBusinessWorkHours(workHours: GramJs.TypeBusinessWorkHours): ApiBusinessWorkHours {
+ const {
+ timezoneId, weeklyOpen,
+ } = workHours;
+
+ return {
+ timezoneId,
+ workHours: weeklyOpen.map(({ startMinute, endMinute }) => ({
+ startMinute,
+ endMinute,
+ })),
+ };
+}
+
+export function buildApiBusinessIntro(intro: GramJs.TypeBusinessIntro): ApiBusinessIntro {
+ const {
+ title, description, sticker,
+ } = intro;
+
+ return {
+ title,
+ description,
+ sticker: sticker && buildStickerFromDocument(sticker),
+ };
+}
diff --git a/src/api/gramjs/apiBuilders/chats.ts b/src/api/gramjs/apiBuilders/chats.ts
index 6afcec7fc..de64b9923 100644
--- a/src/api/gramjs/apiBuilders/chats.ts
+++ b/src/api/gramjs/apiBuilders/chats.ts
@@ -14,6 +14,7 @@ import type {
ApiChatReactions,
ApiChatSettings,
ApiExportedInvite,
+ ApiMissingInvitedUser,
ApiRestrictionReason,
ApiSendAsPeerId,
ApiTopic,
@@ -634,3 +635,13 @@ export function buildApiChatlistExportedInvite(
peerIds: peers.map(getApiChatIdFromMtpPeer).filter(Boolean),
};
}
+
+export function buildApiMissingInvitedUser(
+ user: GramJs.TypeMissingInvitee,
+): ApiMissingInvitedUser {
+ return {
+ id: user.userId.toString(),
+ isRequiringPremiumToMessage: user.premiumRequiredForPm,
+ isRequiringPremiumToInvite: user.premiumWouldAllowInvite,
+ };
+}
diff --git a/src/api/gramjs/apiBuilders/common.ts b/src/api/gramjs/apiBuilders/common.ts
index 6ef96a1e0..e30e39fe0 100644
--- a/src/api/gramjs/apiBuilders/common.ts
+++ b/src/api/gramjs/apiBuilders/common.ts
@@ -154,6 +154,7 @@ export function buildPrivacyRules(rules: GramJs.TypePrivacyRule[]): ApiPrivacySe
let allowChatIds: string[] | undefined;
let blockUserIds: string[] | undefined;
let blockChatIds: string[] | undefined;
+ let shouldAllowPremium: true | undefined;
const localChats = localDb.chats;
@@ -187,6 +188,8 @@ export function buildPrivacyRules(rules: GramJs.TypePrivacyRule[]): ApiPrivacySe
if (localChats[dialogId]) return dialogId;
return channelId;
});
+ } else if (rule instanceof GramJs.PrivacyValueAllowPremium) {
+ shouldAllowPremium = true;
}
});
@@ -203,6 +206,7 @@ export function buildPrivacyRules(rules: GramJs.TypePrivacyRule[]): ApiPrivacySe
allowChatIds: allowChatIds || [],
blockUserIds: blockUserIds || [],
blockChatIds: blockChatIds || [],
+ shouldAllowPremium,
};
}
diff --git a/src/api/gramjs/apiBuilders/messages.ts b/src/api/gramjs/apiBuilders/messages.ts
index 96e0fe426..afc59a2e8 100644
--- a/src/api/gramjs/apiBuilders/messages.ts
+++ b/src/api/gramjs/apiBuilders/messages.ts
@@ -160,7 +160,7 @@ export type UniversalMessage = (
'out' | 'message' | 'entities' | 'fromId' | 'peerId' | 'fwdFrom' | 'replyTo' | 'replyMarkup' | 'post' |
'media' | 'action' | 'views' | 'editDate' | 'editHide' | 'mediaUnread' | 'groupedId' | 'mentioned' | 'viaBotId' |
'replies' | 'fromScheduled' | 'postAuthor' | 'noforwards' | 'reactions' | 'forwards' | 'silent' | 'pinned' |
- 'savedPeerId' | 'fromBoostsApplied' | 'quickReplyShortcutId'
+ 'savedPeerId' | 'fromBoostsApplied' | 'quickReplyShortcutId' | 'viaBusinessBotId'
)>
);
@@ -240,6 +240,7 @@ export function buildApiMessageWithChatId(
hasComments,
savedPeerId,
senderBoosts,
+ viaBusinessBotId: mtpMessage.viaBusinessBotId?.toString(),
});
}
diff --git a/src/api/gramjs/apiBuilders/symbols.ts b/src/api/gramjs/apiBuilders/symbols.ts
index 420f53179..d883756e5 100644
--- a/src/api/gramjs/apiBuilders/symbols.ts
+++ b/src/api/gramjs/apiBuilders/symbols.ts
@@ -22,13 +22,7 @@ export function buildStickerFromDocument(document: GramJs.TypeDocument, isNoPrem
const customEmojiAttribute = document.attributes
.find((attr): attr is GramJs.DocumentAttributeCustomEmoji => attr instanceof GramJs.DocumentAttributeCustomEmoji);
- const fileAttribute = (mimeType === LOTTIE_STICKER_MIME_TYPE || mimeType === VIDEO_STICKER_MIME_TYPE)
- && document.attributes
- .find((attr: any): attr is GramJs.DocumentAttributeFilename => (
- attr instanceof GramJs.DocumentAttributeFilename
- ));
-
- if (!(stickerAttribute || customEmojiAttribute) && !fileAttribute) {
+ if (!(stickerAttribute || customEmojiAttribute)) {
return undefined;
}
@@ -104,9 +98,7 @@ export function buildStickerFromDocument(document: GramJs.TypeDocument, isNoPrem
export function buildStickerSet(set: GramJs.StickerSet): ApiStickerSet {
const {
archived,
- animated,
installedDate,
- videos,
id,
accessHash,
title,
@@ -117,17 +109,25 @@ export function buildStickerSet(set: GramJs.StickerSet): ApiStickerSet {
thumbDocumentId,
} = set;
+ const hasStaticThumb = thumbs?.some((thumb) => thumb.type === 's');
+ const hasAnimatedThumb = thumbs?.some((thumb) => thumb.type === 'a');
+ const hasVideoThumb = thumbs?.some((thumb) => thumb.type === 'v');
+ const thumbCustomEmojiId = thumbDocumentId && String(thumbDocumentId);
+
+ const hasThumbnail = hasStaticThumb || hasAnimatedThumb || hasVideoThumb || Boolean(thumbCustomEmojiId);
+
return {
isArchived: archived,
- isLottie: animated,
- isVideos: videos,
isEmoji: emojis,
installedDate,
id: String(id),
accessHash: String(accessHash),
title,
- hasThumbnail: Boolean(thumbs?.length || thumbDocumentId),
- thumbCustomEmojiId: thumbDocumentId?.toString(),
+ hasStaticThumb,
+ hasAnimatedThumb,
+ hasVideoThumb,
+ hasThumbnail,
+ thumbCustomEmojiId,
count,
shortName,
};
diff --git a/src/api/gramjs/apiBuilders/users.ts b/src/api/gramjs/apiBuilders/users.ts
index 10d0bd163..717dcea8b 100644
--- a/src/api/gramjs/apiBuilders/users.ts
+++ b/src/api/gramjs/apiBuilders/users.ts
@@ -1,8 +1,6 @@
import { Api as GramJs } from '../../../lib/gramjs';
import type {
- ApiBusinessLocation,
- ApiBusinessWorkHours,
ApiPremiumGiftOption,
ApiUser,
ApiUserFullInfo,
@@ -12,8 +10,8 @@ import type {
import { omitUndefined } from '../../../util/iteratees';
import { buildApiBotInfo } from './bots';
+import { buildApiBusinessIntro, buildApiBusinessLocation, buildApiBusinessWorkHours } from './business';
import { buildApiPhoto, buildApiUsernames } from './common';
-import { buildGeoPoint } from './messageContent';
import { buildApiEmojiStatus, buildApiPeerColor, buildApiPeerId } from './peers';
export function buildApiUserFullInfo(mtpUserFull: GramJs.users.UserFull): ApiUserFullInfo {
@@ -22,7 +20,8 @@ export function buildApiUserFullInfo(mtpUserFull: GramJs.users.UserFull): ApiUse
about, commonChatsCount, pinnedMsgId, botInfo, blocked,
profilePhoto, voiceMessagesForbidden, premiumGifts,
fallbackPhoto, personalPhoto, translationsDisabled, storiesPinnedAvailable,
- contactRequirePremium, businessWorkHours, businessLocation,
+ contactRequirePremium, businessWorkHours, businessLocation, businessIntro,
+ personalChannelId, personalChannelMessage,
},
users,
} = mtpUserFull;
@@ -45,6 +44,9 @@ export function buildApiUserFullInfo(mtpUserFull: GramJs.users.UserFull): ApiUse
isContactRequirePremium: contactRequirePremium,
businessLocation: businessLocation && buildApiBusinessLocation(businessLocation),
businessWorkHours: businessWorkHours && buildApiBusinessWorkHours(businessWorkHours),
+ businessIntro: businessIntro && buildApiBusinessIntro(businessIntro),
+ personalChannelId: personalChannelId && buildApiPeerId(personalChannelId, 'channel'),
+ personalChannelMessageId: personalChannelMessage,
});
}
@@ -159,28 +161,3 @@ export function buildApiPremiumGiftOption(option: GramJs.TypePremiumGiftOption):
botUrl,
};
}
-
-export function buildApiBusinessLocation(location: GramJs.TypeBusinessLocation): ApiBusinessLocation {
- const {
- address, geoPoint,
- } = location;
-
- return {
- address,
- geo: geoPoint && buildGeoPoint(geoPoint),
- };
-}
-
-export function buildApiBusinessWorkHours(workHours: GramJs.TypeBusinessWorkHours): ApiBusinessWorkHours {
- const {
- timezoneId, weeklyOpen,
- } = workHours;
-
- return {
- timezoneId,
- workHours: weeklyOpen.map(({ startMinute, endMinute }) => ({
- startMinute,
- endMinute,
- })),
- };
-}
diff --git a/src/api/gramjs/gramjsBuilders/index.ts b/src/api/gramjs/gramjsBuilders/index.ts
index 6b9dfc860..e18dfd62f 100644
--- a/src/api/gramjs/gramjsBuilders/index.ts
+++ b/src/api/gramjs/gramjsBuilders/index.ts
@@ -749,6 +749,9 @@ export function buildInputPrivacyRules(
)),
}));
}
+ if (rules.shouldAllowPremium) {
+ privacyRules.push(new GramJs.InputPrivacyValueAllowPremium());
+ }
if (!rules.isUnspecified) {
switch (rules.visibility) {
diff --git a/src/api/gramjs/methods/chats.ts b/src/api/gramjs/methods/chats.ts
index 31e142e6d..2104f066b 100644
--- a/src/api/gramjs/methods/chats.ts
+++ b/src/api/gramjs/methods/chats.ts
@@ -11,6 +11,7 @@ import type {
ApiChatReactions,
ApiGroupCall,
ApiMessage,
+ ApiMissingInvitedUser,
ApiPeer,
ApiPhoto,
ApiTopic,
@@ -42,6 +43,7 @@ import {
buildApiChatlistInvite,
buildApiChatReactions,
buildApiChatSettings,
+ buildApiMissingInvitedUser,
buildApiTopic,
buildChatMembers,
getPeerKey,
@@ -73,10 +75,10 @@ import {
import localDb from '../localDb';
import { scheduleMutedChatUpdate } from '../scheduleUnmute';
import {
- applyState, processAffectedHistory, processUpdate, updateChannelState,
+ applyState, processAffectedHistory, updateChannelState,
} from '../updates/updateManager';
import { dispatchThreadInfoUpdates } from '../updates/updater';
-import { invokeRequest, uploadFile } from './client';
+import { handleGramJsUpdate, invokeRequest, uploadFile } from './client';
type FullChatData = {
fullInfo: ApiChatFullInfo;
@@ -782,36 +784,20 @@ export async function createChannel({
const channel = buildApiChatFromPreview(newChannel)!;
- let restrictedUserIds: string[] | undefined;
+ let missingUsers: ApiMissingInvitedUser[] | undefined;
if (users?.length) {
- try {
- const updates = await invokeRequest(new GramJs.channels.InviteToChannel({
- channel: buildInputEntity(channel.id, channel.accessHash) as GramJs.InputChannel,
- users: users.map(({ id, accessHash }) => buildInputEntity(id, accessHash)) as GramJs.InputUser[],
- }), {
- shouldIgnoreUpdates: true,
- shouldThrow: true,
- });
- if (updates) {
- processUpdate(updates);
- restrictedUserIds = handleUserPrivacyRestrictedUpdates(updates);
- }
- } catch (err) {
- if ((err as Error).message === 'USER_PRIVACY_RESTRICTED') {
- restrictedUserIds = users.map(({ id }) => id);
- } else {
- onUpdate({
- '@type': 'error',
- error: {
- message: (err as Error).message,
- },
- });
- }
- }
+ const invitedUsers = await invokeRequest(new GramJs.channels.InviteToChannel({
+ channel: buildInputEntity(channel.id, channel.accessHash) as GramJs.InputChannel,
+ users: users.map(({ id, accessHash }) => buildInputEntity(id, accessHash)) as GramJs.InputUser[],
+ }));
+ if (!invitedUsers) return undefined;
+
+ handleGramJsUpdate(invitedUsers.updates);
+ missingUsers = invitedUsers.missingInvitees.map(buildApiMissingInvitedUser);
}
- return { channel, restrictedUserIds };
+ return { channel, missingUsers };
}
export function joinChannel({
@@ -882,37 +868,25 @@ export async function createGroupChat({
}: {
title: string; users: ApiUser[];
}) {
- const result = await invokeRequest(new GramJs.messages.CreateChat({
+ const invitedUsers = await invokeRequest(new GramJs.messages.CreateChat({
title,
users: users.map(({ id, accessHash }) => buildInputEntity(id, accessHash)) as GramJs.InputUser[],
- }), {
- shouldIgnoreUpdates: true,
- shouldThrow: true,
- });
+ }));
+ if (!invitedUsers) return undefined;
- // `createChat` can return a lot of different update types according to docs,
- // but currently chat creation returns only `Updates` type.
- // Errors are added to catch unexpected cases in future testing
- if (!(result instanceof GramJs.Updates)) {
- if (DEBUG) {
- // eslint-disable-next-line no-console
- console.error('Unexpected chat creation update', result);
- }
- return undefined;
- }
- processUpdate(result);
- const restrictedUserIds = handleUserPrivacyRestrictedUpdates(result);
+ handleGramJsUpdate(invitedUsers.updates);
+ const missingUsers = invitedUsers.missingInvitees.map(buildApiMissingInvitedUser);
- const newChat = result.chats[0];
+ const newChat = (invitedUsers.updates as GramJs.Updates).chats[0];
if (!newChat || !(newChat instanceof GramJs.Chat)) {
if (DEBUG) {
// eslint-disable-next-line no-console
- console.error('Created chat not found', result);
+ console.error('Created chat not found', invitedUsers.updates);
}
return undefined;
}
- return { chat: buildApiChatFromPreview(newChat), restrictedUserIds };
+ return { chat: buildApiChatFromPreview(newChat), missingUsers };
}
export async function editChatPhoto({
@@ -1437,48 +1411,24 @@ export async function openChatByInvite(hash: string) {
export async function addChatMembers(chat: ApiChat, users: ApiUser[]) {
try {
if (chat.type === 'chatTypeChannel' || chat.type === 'chatTypeSuperGroup') {
- try {
- const updates = await invokeRequest(new GramJs.channels.InviteToChannel({
- channel: buildInputEntity(chat.id, chat.accessHash) as GramJs.InputChannel,
- users: users.map((user) => buildInputEntity(user.id, user.accessHash)) as GramJs.InputUser[],
- }), {
- shouldIgnoreUpdates: true,
- shouldThrow: true,
- });
- if (!updates) {
- return undefined;
- }
- processUpdate(updates);
- return handleUserPrivacyRestrictedUpdates(updates);
- } catch (err) {
- if ((err as Error).message === 'USER_PRIVACY_RESTRICTED') {
- return users.map(({ id }) => id);
- }
- throw err;
- }
+ const invitedUsers = await invokeRequest(new GramJs.channels.InviteToChannel({
+ channel: buildInputEntity(chat.id, chat.accessHash) as GramJs.InputChannel,
+ users: users.map((user) => buildInputEntity(user.id, user.accessHash)) as GramJs.InputUser[],
+ }));
+ if (!invitedUsers) return undefined;
+ handleGramJsUpdate(invitedUsers.updates);
+ return invitedUsers.missingInvitees.map(buildApiMissingInvitedUser);
}
const addChatUsersResult = await Promise.all(
users.map(async (user) => {
- try {
- const updates = await invokeRequest(new GramJs.messages.AddChatUser({
- chatId: buildInputEntity(chat.id) as BigInt.BigInteger,
- userId: buildInputEntity(user.id, user.accessHash) as GramJs.InputUser,
- }), {
- shouldIgnoreUpdates: true,
- shouldThrow: true,
- });
- if (updates) {
- processUpdate(updates);
- return handleUserPrivacyRestrictedUpdates(updates);
- }
- return undefined;
- } catch (err) {
- if ((err as Error).message === 'USER_PRIVACY_RESTRICTED') {
- return [user.id];
- }
- throw err;
- }
+ const invitedUsers = await invokeRequest(new GramJs.messages.AddChatUser({
+ chatId: buildInputEntity(chat.id) as BigInt.BigInteger,
+ userId: buildInputEntity(user.id, user.accessHash) as GramJs.InputUser,
+ }));
+ if (!invitedUsers) return undefined;
+ handleGramJsUpdate(invitedUsers.updates);
+ return invitedUsers.missingInvitees.map(buildApiMissingInvitedUser);
}),
);
if (addChatUsersResult) {
@@ -2066,24 +2016,3 @@ export async function fetchChannelRecommendations({ chat }: { chat: ApiChat }) {
result instanceof GramJs.messages.ChatsSlice ? result.count : undefined,
};
}
-
-function handleUserPrivacyRestrictedUpdates(updates: GramJs.TypeUpdates) {
- if (!(updates instanceof GramJs.Updates) && !(updates instanceof GramJs.UpdatesCombined)) {
- return undefined;
- }
-
- const eligibleUpdates = updates
- .updates
- .filter(
- (u): u is GramJs.UpdateGroupInvitePrivacyForbidden => {
- return u instanceof GramJs.UpdateGroupInvitePrivacyForbidden;
- },
- );
-
- if (eligibleUpdates.length === 0) {
- return undefined;
- }
-
- return eligibleUpdates
- .map((u) => buildApiPeerId(u.userId, 'user'));
-}
diff --git a/src/api/gramjs/methods/media.ts b/src/api/gramjs/methods/media.ts
index 7d6fef37c..f6845818d 100644
--- a/src/api/gramjs/methods/media.ts
+++ b/src/api/gramjs/methods/media.ts
@@ -171,7 +171,7 @@ async function download(
mimeType = 'image/jpeg';
}
} else if (entityType === 'sticker' && sizeType) {
- mimeType = 'image/webp';
+ mimeType = (entity as GramJs.Document).mimeType;
} else if (entityType === 'webDocument') {
mimeType = (entity as GramJs.TypeWebDocument).mimeType;
fullSize = (entity as GramJs.TypeWebDocument).size;
@@ -221,12 +221,6 @@ function getMessageMediaMimeType(message: GramJs.Message, sizeType?: string) {
if (message.media instanceof GramJs.MessageMediaDocument) {
const document = message.media.document;
if (document instanceof GramJs.Document) {
- if (sizeType) {
- return document.attributes.some((a) => a instanceof GramJs.DocumentAttributeSticker)
- ? 'image/webp'
- : 'image/jpeg';
- }
-
return document.mimeType;
}
}
diff --git a/src/api/gramjs/methods/messages.ts b/src/api/gramjs/methods/messages.ts
index b938e67fe..31cb78ea7 100644
--- a/src/api/gramjs/methods/messages.ts
+++ b/src/api/gramjs/methods/messages.ts
@@ -1958,9 +1958,20 @@ export async function sendQuickReply({
chat: ApiChat;
shortcutId: number;
}) {
+ // Remove this request when the client fully supports quick replies and caches them
+ const messages = await invokeRequest(new GramJs.messages.GetQuickReplyMessages({
+ shortcutId,
+ }));
+ if (!messages || messages instanceof GramJs.messages.MessagesNotModified) return;
+
+ const ids = messages.messages.map((m) => m.id);
+ const randomIds = ids.map(generateRandomBigInt);
+
const result = await invokeRequest(new GramJs.messages.SendQuickReplyMessages({
peer: buildInputPeer(chat.id, chat.accessHash),
shortcutId,
+ id: ids,
+ randomId: randomIds,
}), {
shouldIgnoreUpdates: true,
});
diff --git a/src/api/gramjs/methods/payments.ts b/src/api/gramjs/methods/payments.ts
index f08e43507..815c13c8d 100644
--- a/src/api/gramjs/methods/payments.ts
+++ b/src/api/gramjs/methods/payments.ts
@@ -30,7 +30,7 @@ import {
serializeBytes,
} from '../helpers';
import localDb from '../localDb';
-import { invokeRequest } from './client';
+import { handleGramJsUpdate, invokeRequest } from './client';
import { getTemporaryPaymentPassword } from './twoFaSettings';
let onUpdate: OnApiUpdate;
@@ -108,6 +108,8 @@ export async function sendPaymentForm({
...(tipAmount && { tipAmount: BigInt(tipAmount) }),
}));
+ if (!result) return false;
+
if (result instanceof GramJs.payments.PaymentVerificationNeeded) {
onUpdate({
'@type': 'updatePaymentVerificationNeeded',
@@ -115,6 +117,8 @@ export async function sendPaymentForm({
});
return undefined;
+ } else {
+ handleGramJsUpdate(result.updates);
}
return Boolean(result);
diff --git a/src/api/gramjs/methods/users.ts b/src/api/gramjs/methods/users.ts
index ad6da1a4c..682eecf67 100644
--- a/src/api/gramjs/methods/users.ts
+++ b/src/api/gramjs/methods/users.ts
@@ -50,6 +50,7 @@ export async function fetchFullUser({
updateLocalDb(result);
addEntitiesToLocalDb(result.users);
+ addEntitiesToLocalDb(result.chats);
if (result.fullUser.profilePhoto instanceof GramJs.Photo) {
localDb.photos[result.fullUser.profilePhoto.id.toString()] = result.fullUser.profilePhoto;
@@ -71,8 +72,15 @@ export async function fetchFullUser({
localDb.documents[botInfo.descriptionDocument.id.toString()] = botInfo.descriptionDocument;
}
+ if (result.fullUser.businessIntro?.sticker instanceof GramJs.Document) {
+ localDb.documents[result.fullUser.businessIntro.sticker.id.toString()] = result.fullUser.businessIntro.sticker;
+ }
+
const fullInfo = buildApiUserFullInfo(result);
- const user = buildApiUser(result.users[0])!;
+ const users = result.users.map(buildApiUser).filter(Boolean);
+ const chats = result.chats.map((c) => buildApiChatFromPreview(c)).filter(Boolean);
+
+ const user = users.find(({ id: userId }) => userId === id)!;
onUpdate({
'@type': 'updateUser',
@@ -84,7 +92,12 @@ export async function fetchFullUser({
fullInfo,
});
- return { user, fullInfo };
+ return {
+ user,
+ fullInfo,
+ users,
+ chats,
+ };
}
export async function fetchCommonChats(id: string, accessHash?: string, maxId?: string) {
diff --git a/src/api/types/business.ts b/src/api/types/business.ts
new file mode 100644
index 000000000..450e2ad05
--- /dev/null
+++ b/src/api/types/business.ts
@@ -0,0 +1,22 @@
+import type { ApiGeoPoint, ApiSticker } from './messages';
+
+export interface ApiBusinessLocation {
+ geo?: ApiGeoPoint;
+ address: string;
+}
+
+export interface ApiBusinessTimetableSegment {
+ startMinute: number;
+ endMinute: number;
+}
+
+export interface ApiBusinessWorkHours {
+ timezoneId: string;
+ workHours: ApiBusinessTimetableSegment[];
+}
+
+export interface ApiBusinessIntro {
+ title: string;
+ description: string;
+ sticker?: ApiSticker;
+}
diff --git a/src/api/types/chats.ts b/src/api/types/chats.ts
index bc7b4f8fc..0d7910453 100644
--- a/src/api/types/chats.ts
+++ b/src/api/types/chats.ts
@@ -278,3 +278,9 @@ export interface ApiPeerColor {
color?: number;
backgroundEmojiId?: string;
}
+
+export interface ApiMissingInvitedUser {
+ id: string;
+ isRequiringPremiumToInvite?: boolean;
+ isRequiringPremiumToMessage?: boolean;
+}
diff --git a/src/api/types/index.ts b/src/api/types/index.ts
index ad51f3492..cb9d019cf 100644
--- a/src/api/types/index.ts
+++ b/src/api/types/index.ts
@@ -10,3 +10,4 @@ export * from './misc';
export * from './calls';
export * from './statistics';
export * from './stories';
+export * from './business';
diff --git a/src/api/types/messages.ts b/src/api/types/messages.ts
index 09a3a1202..f5d94b476 100644
--- a/src/api/types/messages.ts
+++ b/src/api/types/messages.ts
@@ -52,14 +52,15 @@ export interface ApiSticker {
export interface ApiStickerSet {
isArchived?: true;
- isLottie?: true;
- isVideos?: true;
isEmoji?: true;
installedDate?: number;
id: string;
accessHash: string;
title: string;
hasThumbnail?: boolean;
+ hasStaticThumb?: boolean;
+ hasAnimatedThumb?: boolean;
+ hasVideoThumb?: boolean;
thumbCustomEmojiId?: string;
count: number;
stickers?: ApiSticker[];
@@ -564,6 +565,7 @@ export interface ApiMessage {
isKeyboardSingleUse?: boolean;
isKeyboardSelective?: boolean;
viaBotId?: string;
+ viaBusinessBotId?: string;
postAuthorTitle?: string;
isScheduled?: boolean;
shouldHideKeyboardButtons?: boolean;
diff --git a/src/api/types/misc.ts b/src/api/types/misc.ts
index db04ac03b..42b644512 100644
--- a/src/api/types/misc.ts
+++ b/src/api/types/misc.ts
@@ -203,6 +203,7 @@ export interface ApiAppConfig {
storyViewersExpirePeriod: number;
storyChangelogUserId: string;
groupTranscribeLevelMin?: number;
+ canLimitNewMessagesWithoutPremium?: boolean;
}
export interface ApiConfig {
diff --git a/src/api/types/users.ts b/src/api/types/users.ts
index 58e1cd734..99cf563dd 100644
--- a/src/api/types/users.ts
+++ b/src/api/types/users.ts
@@ -1,7 +1,8 @@
import type { API_CHAT_TYPES } from '../../config';
import type { ApiBotInfo } from './bots';
+import type { ApiBusinessIntro, ApiBusinessLocation, ApiBusinessWorkHours } from './business';
import type { ApiPeerColor } from './chats';
-import type { ApiDocument, ApiGeoPoint, ApiPhoto } from './messages';
+import type { ApiDocument, ApiPhoto } from './messages';
export interface ApiUser {
id: string;
@@ -54,8 +55,11 @@ export interface ApiUserFullInfo {
isTranslationDisabled?: true;
hasPinnedStories?: boolean;
isContactRequirePremium?: boolean;
+ personalChannelId?: string;
+ personalChannelMessageId?: number;
businessLocation?: ApiBusinessLocation;
businessWorkHours?: ApiBusinessWorkHours;
+ businessIntro?: ApiBusinessIntro;
}
export type ApiFakeType = 'fake' | 'scam';
@@ -115,18 +119,3 @@ export interface ApiEmojiStatus {
documentId: string;
until?: number;
}
-
-export interface ApiBusinessLocation {
- geo?: ApiGeoPoint;
- address: string;
-}
-
-export interface ApiBusinessTimetableSegment {
- startMinute: number;
- endMinute: number;
-}
-
-export interface ApiBusinessWorkHours {
- timezoneId: string;
- workHours: ApiBusinessTimetableSegment[];
-}
diff --git a/src/components/common/ChatExtra.module.scss b/src/components/common/ChatExtra.module.scss
new file mode 100644
index 000000000..fbb856757
--- /dev/null
+++ b/src/components/common/ChatExtra.module.scss
@@ -0,0 +1,38 @@
+.businessLocation {
+ width: 4rem;
+ height: 4rem;
+ object-fit: cover;
+ border-radius: 0.25rem;
+ flex-shrink: 0;
+ margin-inline-start: 0.25rem;
+}
+
+.personalChannel {
+ display: grid;
+ grid-template-columns: 1fr auto;
+ grid-template-rows: auto auto;
+ column-gap: 0.5rem;
+ margin-bottom: 0.5rem;
+}
+
+.personalChannelTitle {
+ grid-column: 1;
+ grid-row: 1;
+ color: var(--color-text-secondary);
+ font-size: 0.875rem;
+ margin-inline-start: 0.5rem;
+ margin-bottom: 0;
+}
+
+.personalChannelSubscribers {
+ grid-column: 2;
+ grid-row: 1;
+ color: var(--color-text-secondary);
+ font-size: 0.875rem;
+ margin-inline-end: 0.5rem;
+}
+
+.personalChannelItem {
+ grid-column: 1 / span 2;
+ grid-row: 2;
+}
diff --git a/src/components/common/ChatExtra.tsx b/src/components/common/ChatExtra.tsx
index 3cac4740f..91d8c44e7 100644
--- a/src/components/common/ChatExtra.tsx
+++ b/src/components/common/ChatExtra.tsx
@@ -32,6 +32,7 @@ import { copyTextToClipboard } from '../../util/clipboard';
import { formatPhoneNumberWithCode } from '../../util/phoneNumber';
import { debounce } from '../../util/schedulers';
import stopEvent from '../../util/stopEvent';
+import { ChatAnimationTypes } from '../left/main/hooks';
import renderText from './helpers/renderText';
import useEffectWithPrevDeps from '../../hooks/useEffectWithPrevDeps';
@@ -40,11 +41,14 @@ import useLastCallback from '../../hooks/useLastCallback';
import useMedia from '../../hooks/useMedia';
import useDevicePixelRatio from '../../hooks/window/useDevicePixelRatio';
+import Chat from '../left/main/Chat';
import ListItem from '../ui/ListItem';
import Skeleton from '../ui/placeholder/Skeleton';
import Switcher from '../ui/Switcher';
import BusinessHours from './BusinessHours';
+import styles from './ChatExtra.module.scss';
+
type OwnProps = {
chatOrUserId: string;
isSavedDialog?: boolean;
@@ -63,6 +67,7 @@ type StateProps = {
chatInviteLink?: string;
topicLink?: string;
hasSavedMessages?: boolean;
+ personalChannel?: ApiChat;
};
const DEFAULT_MAP_CONFIG = {
@@ -87,6 +92,7 @@ const ChatExtra: FC = ({
chatInviteLink,
topicLink,
hasSavedMessages,
+ personalChannel,
}) => {
const {
showNotification,
@@ -105,7 +111,11 @@ const ChatExtra: FC = ({
} = user || {};
const { id: chatId, usernames: chatUsernames } = chat || {};
const peerId = userId || chatId;
- const { businessLocation, businessWorkHours } = userFullInfo || {};
+ const {
+ businessLocation,
+ businessWorkHours,
+ personalChannelMessageId,
+ } = userFullInfo || {};
const lang = useLang();
const [areNotificationsEnabled, setAreNotificationsEnabled] = useState(!isMuted);
@@ -261,6 +271,22 @@ const ChatExtra: FC = ({
return (
+ {personalChannel && (
+
+
{lang('ProfileChannel')}
+
+ {lang('Subscribers', personalChannel.membersCount, 'i')}
+
+
+
+ )}
{formattedNumber && Boolean(formattedNumber.length) && (
// eslint-disable-next-line react/jsx-no-bind
copy(formattedNumber, lang('Phone'))}>
@@ -365,6 +391,10 @@ export default memo(withGlobal(
const hasSavedMessages = !isSavedDialog && global.chats.listIds.saved?.includes(chatOrUserId);
+ const personalChannel = userFullInfo?.personalChannelId
+ ? selectChat(global, userFullInfo.personalChannelId)
+ : undefined;
+
return {
phoneCodeList,
chat,
@@ -377,6 +407,7 @@ export default memo(withGlobal(
description,
topicLink,
hasSavedMessages,
+ personalChannel,
};
},
)(ChatExtra));
diff --git a/src/components/common/PrivateChatInfo.tsx b/src/components/common/PrivateChatInfo.tsx
index 9ac496334..50838e05d 100644
--- a/src/components/common/PrivateChatInfo.tsx
+++ b/src/components/common/PrivateChatInfo.tsx
@@ -56,6 +56,7 @@ type StateProps =
self?: ApiUser;
isSavedMessages?: boolean;
areMessagesLoaded: boolean;
+ isSynced?: boolean;
};
const PrivateChatInfo: FC = ({
@@ -83,6 +84,7 @@ const PrivateChatInfo: FC = ({
ripple,
className,
storyViewerOrigin,
+ isSynced,
onEmojiStatusClick,
}) => {
const {
@@ -97,10 +99,10 @@ const PrivateChatInfo: FC = ({
useEffect(() => {
if (userId) {
- if (withFullInfo) loadFullUser({ userId });
+ if (withFullInfo && isSynced) loadFullUser({ userId });
if (withMediaViewer) loadProfilePhotos({ profileId: userId });
}
- }, [userId, withFullInfo, withMediaViewer]);
+ }, [userId, withFullInfo, withMediaViewer, isSynced]);
const handleAvatarViewerOpen = useLastCallback(
(e: React.MouseEvent, hasMedia: boolean) => {
@@ -224,6 +226,7 @@ const PrivateChatInfo: FC = ({
export default memo(withGlobal(
(global, { userId, forceShowSelf }): StateProps => {
+ const { isSynced } = global;
const user = selectUser(global, userId);
const userStatus = selectUserStatus(global, userId);
const isSavedMessages = !forceShowSelf && user && user.isSelf;
@@ -236,6 +239,7 @@ export default memo(withGlobal(
isSavedMessages,
areMessagesLoaded,
self,
+ isSynced,
};
},
)(PrivateChatInfo));
diff --git a/src/components/common/ProfileInfo.tsx b/src/components/common/ProfileInfo.tsx
index 9706c1bf2..578a8a61e 100644
--- a/src/components/common/ProfileInfo.tsx
+++ b/src/components/common/ProfileInfo.tsx
@@ -63,7 +63,7 @@ type StateProps =
chatProfilePhoto?: ApiPhoto;
emojiStatusSticker?: ApiSticker;
}
- & Pick;
+ & Pick;
const EMOJI_STATUS_SIZE = 24;
const EMOJI_TOPIC_SIZE = 120;
@@ -74,7 +74,7 @@ const ProfileInfo: FC = ({
user,
userStatus,
chat,
- connectionState,
+ isSynced,
mediaId,
avatarOwnerId,
topic,
@@ -132,10 +132,10 @@ const ProfileInfo: FC = ({
}, [currentPhotoIndex, photos.length]);
useEffect(() => {
- if (connectionState === 'connectionStateReady' && userId && !forceShowSelf) {
+ if (isSynced && userId && !forceShowSelf) {
loadFullUser({ userId });
}
- }, [userId, loadFullUser, connectionState, forceShowSelf]);
+ }, [userId, loadFullUser, isSynced, forceShowSelf]);
usePhotosPreload(photos, currentPhotoIndex);
@@ -381,7 +381,7 @@ const ProfileInfo: FC = ({
export default memo(withGlobal(
(global, { userId }): StateProps => {
- const { connectionState } = global;
+ const { isSynced } = global;
const user = selectUser(global, userId);
const isPrivate = isUserId(userId);
const userStatus = selectUserStatus(global, userId);
@@ -397,7 +397,7 @@ export default memo(withGlobal(
const emojiStatusSticker = emojiStatus ? global.customEmojis.byId[emojiStatus.documentId] : undefined;
return {
- connectionState,
+ isSynced,
user,
userStatus,
chat,
diff --git a/src/components/left/main/Chat.scss b/src/components/left/main/Chat.scss
index 657b5dfd4..e04c00c21 100644
--- a/src/components/left/main/Chat.scss
+++ b/src/components/left/main/Chat.scss
@@ -19,6 +19,14 @@
-webkit-touch-callout: none;
+ &.standalone {
+ position: static;
+
+ .LastMessageMeta {
+ margin-inline-end: 0;
+ }
+ }
+
&.animate-opacity {
will-change: opacity;
transition: opacity 0.2s ease-out;
@@ -54,7 +62,7 @@
}
}
- &:last-of-type {
+ &:not(.standalone):last-of-type {
border-bottom: 0.5rem solid transparent; // `margin` does not help, and `padding` affects forum indicator height
}
@@ -223,7 +231,7 @@
}
.ChatBadge-transition {
- position: relative;
+ position: relative;
transition: opacity var(--layer-transition), transform var(--layer-transition);
body.no-page-transitions & {
diff --git a/src/components/left/main/Chat.tsx b/src/components/left/main/Chat.tsx
index 276dd8987..2cf7f7d9e 100644
--- a/src/components/left/main/Chat.tsx
+++ b/src/components/left/main/Chat.tsx
@@ -79,8 +79,11 @@ type OwnProps = {
orderDiff: number;
animationType: ChatAnimationTypes;
isPinned?: boolean;
- offsetTop: number;
+ offsetTop?: number;
isSavedDialog?: boolean;
+ isPreview?: boolean;
+ previewMessageId?: number;
+ className?: string;
observeIntersection?: ObserveFn;
onDragEnter?: (chatId: string) => void;
};
@@ -139,6 +142,9 @@ const Chat: FC = ({
lastMessage,
isSavedDialog,
currentUserId,
+ isPreview,
+ previewMessageId,
+ className,
onDragEnter,
}) => {
const {
@@ -146,9 +152,11 @@ const Chat: FC = ({
openSavedDialog,
toggleChatInfo,
focusLastMessage,
+ focusMessage,
loadTopics,
openForumPanel,
closeForumPanel,
+ setShouldCloseRightColumn,
} = getActions();
const { isMobile } = useAppLayout();
@@ -181,6 +189,7 @@ const Chat: FC = ({
withInterfaceAnimations,
orderDiff,
isSavedDialog,
+ isPreview,
});
const getIsForumPanelClosed = useSelectorSignal(selectIsForumPanelClosed);
@@ -188,6 +197,18 @@ const Chat: FC = ({
const handleClick = useLastCallback(() => {
const noForumTopicPanel = isMobile && isForumAsMessages;
+ if (isMobile) {
+ setShouldCloseRightColumn({ value: true });
+ }
+
+ if (isPreview) {
+ focusMessage({
+ chatId,
+ messageId: previewMessageId!,
+ });
+ return;
+ }
+
if (isSavedDialog) {
openSavedDialog({ chatId, noForumTopicPanel: true }, { forceOnHeavyAnimation: true });
@@ -256,6 +277,7 @@ const Chat: FC = ({
canChangeFolder,
isSavedDialog,
currentUserId,
+ isPreview,
});
const isIntersecting = useIsIntersecting(ref, chat ? observeIntersection : undefined);
@@ -286,18 +308,20 @@ const Chat: FC = ({
const peer = user || chat;
- const className = buildClassName(
+ const chatClassName = buildClassName(
'Chat chat-item-clickable',
isUserId(chatId) ? 'private' : 'group',
isForum && 'forum',
isSelected && 'selected',
isSelectedForum && 'selected-forum',
+ isPreview && 'standalone',
+ className,
);
return (
= ({
{renderSubtitle()}
-
+ {!isPreview && (
+
+ )}
{shouldRenderDeleteModal && (
@@ -387,7 +418,9 @@ const Chat: FC = ({
};
export default memo(withGlobal(
- (global, { chatId, isSavedDialog }): StateProps => {
+ (global, {
+ chatId, isSavedDialog, isPreview, previewMessageId,
+ }): StateProps => {
const chat = selectChat(global, chatId);
if (!chat) {
return {
@@ -395,8 +428,10 @@ export default memo(withGlobal(
};
}
- const lastMessageId = selectChatLastMessageId(global, chatId, isSavedDialog ? 'saved' : 'all');
- const lastMessage = selectChatLastMessage(global, chatId, isSavedDialog ? 'saved' : 'all');
+ const lastMessageId = previewMessageId || selectChatLastMessageId(global, chatId, isSavedDialog ? 'saved' : 'all');
+ const lastMessage = previewMessageId
+ ? selectChatMessage(global, chatId, previewMessageId)
+ : selectChatLastMessage(global, chatId, isSavedDialog ? 'saved' : 'all');
const { senderId, isOutgoing, forwardInfo } = lastMessage || {};
const actualSenderId = isSavedDialog ? forwardInfo?.fromId : senderId;
const replyToMessageId = lastMessage && getMessageReplyInfo(lastMessage)?.replyToMsgId;
@@ -413,7 +448,7 @@ export default memo(withGlobal(
threadId: currentThreadId,
type: messageListType,
} = selectCurrentMessageList(global) || {};
- const isSelected = chatId === currentChatId && (isSavedDialog
+ const isSelected = !isPreview && chatId === currentChatId && (isSavedDialog
? chatId === currentThreadId : currentThreadId === MAIN_THREAD_ID);
const isSelectedForum = (chat.isForum && chatId === currentChatId)
|| chatId === selectTabState(global).forumPanelChatId;
diff --git a/src/components/left/main/hooks/useChatListEntry.tsx b/src/components/left/main/hooks/useChatListEntry.tsx
index d7cbe91f3..fb390f60e 100644
--- a/src/components/left/main/hooks/useChatListEntry.tsx
+++ b/src/components/left/main/hooks/useChatListEntry.tsx
@@ -59,6 +59,7 @@ export default function useChatListEntry({
withInterfaceAnimations,
isTopic,
isSavedDialog,
+ isPreview,
}: {
chat?: ApiChat;
lastMessage?: ApiMessage;
@@ -73,6 +74,7 @@ export default function useChatListEntry({
observeIntersection?: ObserveFn;
isTopic?: boolean;
isSavedDialog?: boolean;
+ isPreview?: boolean;
animationType: ChatAnimationTypes;
orderDiff: number;
@@ -104,14 +106,15 @@ export default function useChatListEntry({
}, [actionTargetUserIds]);
const renderLastMessageOrTyping = useCallback(() => {
- if (!isSavedDialog && typingStatus && lastMessage && typingStatus.timestamp > lastMessage.date * 1000) {
+ if (!isSavedDialog && !isPreview
+ && typingStatus && lastMessage && typingStatus.timestamp > lastMessage.date * 1000) {
return ;
}
const isDraftReplyToTopic = draft && draft.replyInfo?.replyToMsgId === lastMessageTopic?.id;
const isEmptyLocalReply = draft?.replyInfo && !draft.text && draft.isLocal;
- const canDisplayDraft = !chat?.isForum && !isSavedDialog && draft && !isEmptyLocalReply
+ const canDisplayDraft = !chat?.isForum && !isSavedDialog && !isPreview && draft && !isEmptyLocalReply
&& (!isTopic || !isDraftReplyToTopic);
if (canDisplayDraft) {
@@ -180,7 +183,7 @@ export default function useChatListEntry({
}, [
actionTargetChatId, actionTargetMessage, actionTargetUsers, chat, chatId, draft, isAction,
isRoundVideo, isTopic, lang, lastMessage, lastMessageSender, lastMessageTopic, mediaBlobUrl, mediaThumbnail,
- observeIntersection, typingStatus, isSavedDialog,
+ observeIntersection, typingStatus, isSavedDialog, isPreview,
]);
function renderSubtitle() {
diff --git a/src/components/left/settings/PrivacyMessages.tsx b/src/components/left/settings/PrivacyMessages.tsx
index f33dc11ae..e4b6a1973 100644
--- a/src/components/left/settings/PrivacyMessages.tsx
+++ b/src/components/left/settings/PrivacyMessages.tsx
@@ -18,29 +18,36 @@ type OwnProps = {
type StateProps = {
shouldNewNonContactPeersRequirePremium?: boolean;
+ canLimitNewMessagesWithoutPremium?: boolean;
isCurrentUserPremium?: boolean;
};
function PrivacyMessages({
- isActive, onReset, shouldNewNonContactPeersRequirePremium, isCurrentUserPremium,
+ isActive,
+ canLimitNewMessagesWithoutPremium,
+ shouldNewNonContactPeersRequirePremium,
+ isCurrentUserPremium,
+ onReset,
}: OwnProps & StateProps) {
const { updateGlobalPrivacySettings } = getActions();
const lang = useLang();
+ const canChange = isCurrentUserPremium || canLimitNewMessagesWithoutPremium;
+
const options = useMemo(() => {
return [
{ value: 'everybody', label: lang('P2PEverybody') },
{
value: 'contacts_and_premium',
- label: isCurrentUserPremium ? (
+ label: canChange ? (
lang('PrivacyMessagesContactsAndPremium')
) : (
),
- hidden: !isCurrentUserPremium,
+ hidden: !canChange,
},
];
- }, [lang, isCurrentUserPremium]);
+ }, [lang, canChange]);
const handleChange = useLastCallback((privacy: string) => {
updateGlobalPrivacySettings({ shouldNewNonContactPeersRequirePremium: privacy === 'contacts_and_premium' });
@@ -67,7 +74,7 @@ function PrivacyMessages({
{lang('Privacy.Messages.SectionFooter')}
- {!isCurrentUserPremium && }
+ {!canChange && }
>
);
}
@@ -76,5 +83,6 @@ export default memo(withGlobal((global): StateProps => {
return {
shouldNewNonContactPeersRequirePremium: selectNewNoncontactPeersRequirePremium(global),
isCurrentUserPremium: selectIsCurrentUserPremium(global),
+ canLimitNewMessagesWithoutPremium: global.appConfig?.canLimitNewMessagesWithoutPremium,
};
})(PrivacyMessages));
diff --git a/src/components/left/settings/Settings.scss b/src/components/left/settings/Settings.scss
index 45ac789a4..08aeaf1ad 100644
--- a/src/components/left/settings/Settings.scss
+++ b/src/components/left/settings/Settings.scss
@@ -120,15 +120,6 @@
margin-bottom: 0.25rem;
}
}
-
- .business-location {
- width: 4rem;
- height: 4rem;
- object-fit: cover;
- border-radius: 0.25rem;
- flex-shrink: 0;
- margin-inline-start: 0.25rem;
- }
}
.settings-item-simple,
diff --git a/src/components/left/settings/SettingsPrivacy.tsx b/src/components/left/settings/SettingsPrivacy.tsx
index 104e89555..47628fa35 100644
--- a/src/components/left/settings/SettingsPrivacy.tsx
+++ b/src/components/left/settings/SettingsPrivacy.tsx
@@ -275,19 +275,6 @@ const SettingsPrivacy: FC = ({
- onScreenSelect(SettingsScreens.PrivacyGroupChats)}
- >
-
- {lang('WhoCanAddMe')}
-
- {getVisibilityValue(privacyGroupChats)}
-
-
-
= ({
+ onScreenSelect(SettingsScreens.PrivacyGroupChats)}
+ >
+
+ {lang('WhoCanAddMe')}
+
+ {getVisibilityValue(privacyGroupChats)}
+
+
+
{canChangeSensitive && (
diff --git a/src/components/middle/ContactGreeting.scss b/src/components/middle/ContactGreeting.module.scss
similarity index 69%
rename from src/components/middle/ContactGreeting.scss
rename to src/components/middle/ContactGreeting.module.scss
index 5e4b50c8e..732e48850 100644
--- a/src/components/middle/ContactGreeting.scss
+++ b/src/components/middle/ContactGreeting.module.scss
@@ -1,10 +1,12 @@
-.ContactGreeting {
+.root {
width: 100%;
height: 100%;
display: flex;
+ flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
+ gap: 0.5rem;
.wrapper {
display: inline-flex;
@@ -17,6 +19,16 @@
color: #fff;
}
+ .explainer {
+ background: var(--pattern-color);
+ padding: 0.25rem 0.5rem;
+ border-radius: 1rem;
+ font-size: 0.875rem;
+ color: #fff;
+ max-width: 14.5rem;
+ text-wrap: balance;
+ }
+
.title {
font-weight: 500;
margin-bottom: 0;
@@ -28,7 +40,7 @@
}
.sticker {
- margin: 2rem 0 1rem;
+ margin: 1rem;
height: 10rem;
width: 10rem;
cursor: var(--custom-cursor, pointer);
diff --git a/src/components/middle/ContactGreeting.tsx b/src/components/middle/ContactGreeting.tsx
index 371989ad2..abb085c0d 100644
--- a/src/components/middle/ContactGreeting.tsx
+++ b/src/components/middle/ContactGreeting.tsx
@@ -4,34 +4,47 @@ import React, {
} from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global';
-import type { ApiSticker, ApiUpdateConnectionStateType } from '../../api/types';
+import type {
+ ApiBusinessIntro, ApiSticker, ApiUpdateConnectionStateType, ApiUser,
+} from '../../api/types';
import type { MessageList } from '../../global/types';
-import { selectChat, selectChatLastMessage, selectCurrentMessageList } from '../../global/selectors';
+import { getUserFullName } from '../../global/helpers';
+import {
+ selectChat,
+ selectChatLastMessage,
+ selectCurrentMessageList,
+ selectUser,
+ selectUserFullInfo,
+} from '../../global/selectors';
import useLang from '../../hooks/useLang';
import useLastCallback from '../../hooks/useLastCallback';
import StickerView from '../common/StickerView';
-import './ContactGreeting.scss';
+import styles from './ContactGreeting.module.scss';
type OwnProps = {
userId: string;
};
type StateProps = {
- stickers?: ApiSticker[];
+ defaultStickers?: ApiSticker[];
lastUnreadMessageId?: number;
connectionState?: ApiUpdateConnectionStateType;
currentMessageList?: MessageList;
+ businessIntro?: ApiBusinessIntro;
+ user?: ApiUser;
};
const ContactGreeting: FC = ({
- stickers,
+ defaultStickers,
connectionState,
lastUnreadMessageId,
currentMessageList,
+ businessIntro,
+ user,
}) => {
const {
loadGreetingStickers,
@@ -45,19 +58,20 @@ const ContactGreeting: FC = ({
const containerRef = useRef(null);
const sticker = useMemo(() => {
- if (!stickers?.length) return undefined;
+ if (businessIntro?.sticker) return businessIntro.sticker;
+ if (!defaultStickers?.length) return undefined;
- const randomIndex = Math.floor(Math.random() * stickers.length);
- return stickers[randomIndex];
- }, [stickers]);
+ const randomIndex = Math.floor(Math.random() * defaultStickers.length);
+ return defaultStickers[randomIndex];
+ }, [businessIntro?.sticker, defaultStickers]);
useEffect(() => {
- if (stickers?.length || connectionState !== 'connectionStateReady') {
+ if (defaultStickers?.length || connectionState !== 'connectionStateReady') {
return;
}
loadGreetingStickers();
- }, [connectionState, loadGreetingStickers, stickers]);
+ }, [connectionState, loadGreetingStickers, defaultStickers]);
useEffect(() => {
if (connectionState === 'connectionStateReady' && lastUnreadMessageId) {
@@ -79,13 +93,16 @@ const ContactGreeting: FC = ({
});
});
- return (
-
-
-
{lang('Conversation.EmptyPlaceholder')}
-
{lang('Conversation.GreetingText')}
+ const title = businessIntro?.title || lang('Conversation.EmptyPlaceholder');
+ const description = businessIntro?.description || lang('Conversation.GreetingText');
-
+ return (
+
+
+
{title}
+
{description}
+
+
{sticker && (
= ({
)}
+ {businessIntro && (
+
+ {lang('Chat.EmptyStateIntroFooter', getUserFullName(user!))}
+
+ )}
);
};
@@ -108,15 +130,20 @@ export default memo(withGlobal
(
return {};
}
+ const user = selectUser(global, userId);
+ const fullInfo = selectUserFullInfo(global, userId);
+
const lastMessage = selectChatLastMessage(global, chat.id);
return {
- stickers,
+ defaultStickers: stickers,
lastUnreadMessageId: lastMessage && lastMessage.id !== chat.lastReadInboxMessageId
? lastMessage.id
: undefined,
connectionState: global.connectionState,
currentMessageList: selectCurrentMessageList(global),
+ businessIntro: fullInfo?.businessIntro,
+ user,
};
},
)(ContactGreeting));
diff --git a/src/components/middle/composer/StickerSetCover.module.scss b/src/components/middle/composer/StickerSetCover.module.scss
index ec8990b33..3f777db0b 100644
--- a/src/components/middle/composer/StickerSetCover.module.scss
+++ b/src/components/middle/composer/StickerSetCover.module.scss
@@ -1,4 +1,6 @@
.root {
+ --custom-emoji-size: 2rem;
+
width: 1.875rem;
height: 1.875rem;
display: flex;
diff --git a/src/components/middle/composer/StickerSetCover.tsx b/src/components/middle/composer/StickerSetCover.tsx
index 23434e36d..e37d499ef 100644
--- a/src/components/middle/composer/StickerSetCover.tsx
+++ b/src/components/middle/composer/StickerSetCover.tsx
@@ -21,6 +21,7 @@ import useMediaTransition from '../../../hooks/useMediaTransition';
import useCustomEmoji from '../../common/hooks/useCustomEmoji';
import AnimatedSticker from '../../common/AnimatedSticker';
+import CustomEmoji from '../../common/CustomEmoji';
import OptimizedVideo from '../../ui/OptimizedVideo';
import styles from './StickerSetCover.module.scss';
@@ -47,7 +48,7 @@ const StickerSetCover: FC = ({
const containerRef = useRef(null);
const {
- hasThumbnail, thumbCustomEmojiId, isLottie, isVideos: isVideo,
+ hasThumbnail, hasVideoThumb, hasAnimatedThumb, hasStaticThumb, thumbCustomEmojiId,
} = stickerSet;
const { customEmoji } = useCustomEmoji(thumbCustomEmojiId);
@@ -58,13 +59,15 @@ const StickerSetCover: FC = ({
const isIntersecting = useIsIntersecting(containerRef, observeIntersection);
const shouldPlay = isIntersecting && !noPlay;
- const shouldFallbackToStatic = stickerSet.stickers && isVideo && !IS_WEBM_SUPPORTED;
+ const hasOnlyStaticThumb = hasStaticThumb && !hasVideoThumb && !hasAnimatedThumb && !thumbCustomEmojiId;
+
+ const shouldFallbackToStatic = hasOnlyStaticThumb || (hasVideoThumb && !IS_WEBM_SUPPORTED && !hasAnimatedThumb);
const staticHash = shouldFallbackToStatic && getStickerPreviewHash(stickerSet.stickers![0].id);
const staticMediaData = useMedia(staticHash, !isIntersecting);
- const mediaHash = ((hasThumbnail && !shouldFallbackToStatic) || isLottie) && `stickerSet${stickerSet.id}`;
+ const mediaHash = ((hasThumbnail && !shouldFallbackToStatic) || hasAnimatedThumb) && `stickerSet${stickerSet.id}`;
const mediaData = useMedia(mediaHash, !isIntersecting);
- const isReady = mediaData || staticMediaData;
+ const isReady = thumbCustomEmojiId || mediaData || staticMediaData;
const transitionClassNames = useMediaTransition(isReady);
const coords = useCoordsInSharedCanvas(containerRef, sharedCanvasRef);
@@ -83,7 +86,14 @@ const StickerSetCover: FC = ({
return (
{isReady ? (
- isLottie ? (
+ thumbCustomEmojiId ? (
+
+ ) : hasAnimatedThumb ? (
= ({
sharedCanvasCoords={coords}
forceAlways={forcePlayback}
/>
- ) : (isVideo && !shouldFallbackToStatic) ? (
+ ) : (hasVideoThumb && !shouldFallbackToStatic) ? (
= ({
openChat,
openChatByUsername,
closeStoryViewer,
+ setShouldCloseRightColumn,
} = getActions();
+ const { isMobile } = useAppLayout();
+
const handleClick = () => {
+ if (isMobile) {
+ setShouldCloseRightColumn({
+ value: true,
+ });
+ }
+
if (userOrChat) {
openChat({ id: userOrChat.id });
} else if (username) {
diff --git a/src/components/middle/message/Message.tsx b/src/components/middle/message/Message.tsx
index 8a139ee4a..4addb9004 100644
--- a/src/components/middle/message/Message.tsx
+++ b/src/components/middle/message/Message.tsx
@@ -283,6 +283,7 @@ type StateProps = {
senderBoosts?: number;
tags?: Record;
canTranscribeVoice?: boolean;
+ viaBusinessBot?: ApiUser;
};
type MetaPosition =
@@ -400,6 +401,7 @@ const Message: FC = ({
senderBoosts,
tags,
canTranscribeVoice,
+ viaBusinessBot,
onPinnedIntersectionChange,
}) => {
const {
@@ -753,7 +755,9 @@ const Message: FC = ({
ref, chatId, isFocused, focusDirection, noFocusHighlight, isResizingContainer, isJustAdded, Boolean(focusedQuote),
);
- const signature = (isChannel && message.postAuthorTitle)
+ const viaBusinessBotTitle = viaBusinessBot ? getSenderTitle(lang, viaBusinessBot) : undefined;
+
+ const signature = viaBusinessBotTitle || (isChannel && message.postAuthorTitle)
|| ((asForwarded || isChatWithSelf) && forwardInfo?.postAuthorTitle)
|| undefined;
@@ -1486,7 +1490,7 @@ export default memo(withGlobal(
message, album, withSenderName, withAvatar, threadId, messageListType, isLastInDocumentGroup, isFirstInGroup,
} = ownProps;
const {
- id, chatId, viaBotId, isOutgoing, forwardInfo, transcriptionId, isPinned,
+ id, chatId, viaBotId, isOutgoing, forwardInfo, transcriptionId, isPinned, viaBusinessBotId,
} = message;
const chat = selectChat(global, chatId);
@@ -1595,6 +1599,8 @@ export default memo(withGlobal(
const transcribeMinLevel = global.appConfig?.groupTranscribeLevelMin;
const canTranscribeVoice = isPremium || Boolean(transcribeMinLevel && chatLevel >= transcribeMinLevel);
+ const viaBusinessBot = viaBusinessBotId ? selectUser(global, viaBusinessBotId) : undefined;
+
return {
theme: selectTheme(global),
forceSenderName,
@@ -1678,6 +1684,7 @@ export default memo(withGlobal(
senderBoosts,
tags: global.savedReactionTags?.byKey,
canTranscribeVoice,
+ viaBusinessBot,
};
},
)(Message));
diff --git a/src/components/modals/webApp/hooks/useWebAppFrame.ts b/src/components/modals/webApp/hooks/useWebAppFrame.ts
index 4a69389d8..a83495420 100644
--- a/src/components/modals/webApp/hooks/useWebAppFrame.ts
+++ b/src/components/modals/webApp/hooks/useWebAppFrame.ts
@@ -201,6 +201,15 @@ const useWebAppFrame = (
window.open(linkUrl, '_blank', 'noreferrer');
}
+ if (eventType === 'web_app_biometry_get_info') {
+ sendEvent({
+ eventType: 'biometry_info_received',
+ eventData: {
+ available: false,
+ },
+ });
+ }
+
onEvent(data);
} catch (err) {
// Ignore other messages
diff --git a/src/components/right/Profile.scss b/src/components/right/Profile.scss
index 217d16084..62619fd44 100644
--- a/src/components/right/Profile.scss
+++ b/src/components/right/Profile.scss
@@ -35,15 +35,6 @@
.FloatingActionButton {
z-index: 1;
}
-
- .business-location {
- width: 4rem;
- height: 4rem;
- object-fit: cover;
- border-radius: 0.25rem;
- flex-shrink: 0;
- margin-inline-start: 0.25rem;
- }
}
.shared-media {
diff --git a/src/components/right/RightColumn.tsx b/src/components/right/RightColumn.tsx
index 204de998f..17cebf126 100644
--- a/src/components/right/RightColumn.tsx
+++ b/src/components/right/RightColumn.tsx
@@ -55,6 +55,7 @@ type StateProps = {
shouldSkipHistoryAnimations?: boolean;
nextManagementScreen?: ManagementScreens;
nextProfileTab?: ProfileTabType;
+ shouldCloseRightColumn?: boolean;
isSavedMessages?: boolean;
isSavedDialog?: boolean;
};
@@ -79,6 +80,7 @@ const RightColumn: FC = ({
shouldSkipHistoryAnimations,
nextManagementScreen,
nextProfileTab,
+ shouldCloseRightColumn,
isSavedMessages,
isSavedDialog,
}) => {
@@ -101,6 +103,7 @@ const RightColumn: FC = ({
closeCreateTopicPanel,
closeEditTopicPanel,
closeBoostStatistics,
+ setShouldCloseRightColumn,
} = getActions();
const { width: windowWidth } = useWindowSize();
@@ -253,6 +256,13 @@ const RightColumn: FC = ({
resetNextProfileTab();
}, [nextProfileTab]);
+ useEffect(() => {
+ if (shouldCloseRightColumn) {
+ close();
+ setShouldCloseRightColumn({ value: undefined });
+ }
+ }, [shouldCloseRightColumn]);
+
// Close Right Column when it transforms into overlayed state on screen resize
useEffect(() => {
if (isOpen && isOverlaying) {
@@ -409,7 +419,9 @@ export default memo(withGlobal(
(global, { isMobile }): StateProps => {
const { chatId, threadId } = selectCurrentMessageList(global) || {};
const areActiveChatsLoaded = selectAreActiveChatsLoaded(global);
- const { management, shouldSkipHistoryAnimations, nextProfileTab } = selectTabState(global);
+ const {
+ management, shouldSkipHistoryAnimations, nextProfileTab, shouldCloseRightColumn,
+ } = selectTabState(global);
const nextManagementScreen = chatId ? management.byChatId[chatId]?.nextScreen : undefined;
const isSavedMessages = chatId ? selectIsChatWithSelf(global, chatId) : undefined;
@@ -423,6 +435,7 @@ export default memo(withGlobal(
shouldSkipHistoryAnimations,
nextManagementScreen,
nextProfileTab,
+ shouldCloseRightColumn,
isSavedMessages,
isSavedDialog,
};
diff --git a/src/config.ts b/src/config.ts
index 4126d9fee..363313755 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -49,7 +49,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-v33';
+export const LANG_CACHE_NAME = 'tt-lang-packs-v34';
export const ASSET_CACHE_NAME = 'tt-assets';
export const AUTODOWNLOAD_FILESIZE_MB_LIMITS = [1, 5, 10, 50, 100, 500];
export const DATA_BROADCAST_CHANNEL_NAME = 'tt-global';
@@ -217,7 +217,7 @@ export const VIDEO_WEBM_TYPE = 'video/webm';
export const GIF_MIME_TYPE = 'image/gif';
export const LOTTIE_STICKER_MIME_TYPE = 'application/x-tgsticker';
-export const VIDEO_STICKER_MIME_TYPE = 'video/webm';
+export const VIDEO_STICKER_MIME_TYPE = VIDEO_WEBM_TYPE;
export const SUPPORTED_IMAGE_CONTENT_TYPES = new Set([
'image/png', 'image/jpeg', GIF_MIME_TYPE,
diff --git a/src/global/actions/api/chats.ts b/src/global/actions/api/chats.ts
index 32e46090c..7b22e327f 100644
--- a/src/global/actions/api/chats.ts
+++ b/src/global/actions/api/chats.ts
@@ -696,7 +696,7 @@ addActionHandler('createChannel', async (global, actions, payload): Promise id);
} catch (error) {
global = getGlobal();
@@ -864,7 +864,7 @@ addActionHandler('createGroupChat', async (global, actions, payload): Promise id);
if (restrictedUserIds) {
global = getGlobal();
global = addUsersToRestrictedInviteList(global, restrictedUserIds, chatId, tabId);
@@ -1918,7 +1920,8 @@ addActionHandler('addChatMembers', async (global, actions, payload): Promise user.id);
if (restrictedUserIds) {
global = getGlobal();
global = addUsersToRestrictedInviteList(global, restrictedUserIds, chat.id, tabId);
diff --git a/src/global/actions/api/settings.ts b/src/global/actions/api/settings.ts
index c2a3e2440..f3a3515f4 100644
--- a/src/global/actions/api/settings.ts
+++ b/src/global/actions/api/settings.ts
@@ -542,6 +542,7 @@ addActionHandler('setPrivacySettings', async (global, actions, payload): Promise
const rules = buildApiInputPrivacyRules(global, {
visibility: settings.visibility,
isUnspecified: settings.isUnspecified,
+ shouldAllowPremium: settings.shouldAllowPremium,
allowedIds: isAllowList ? updatedIds : [...settings.allowUserIds, ...settings.allowChatIds],
blockedIds: !isAllowList ? updatedIds : [...settings.blockUserIds, ...settings.blockChatIds],
});
diff --git a/src/global/actions/api/users.ts b/src/global/actions/api/users.ts
index bdae44047..b66a7e895 100644
--- a/src/global/actions/api/users.ts
+++ b/src/global/actions/api/users.ts
@@ -21,6 +21,7 @@ import {
closeNewContactDialog,
replaceUserStatuses,
updateChat,
+ updateChats,
updateManagementProgress,
updateUser,
updateUserFullInfo,
@@ -60,6 +61,9 @@ addActionHandler('loadFullUser', async (global, actions, payload): Promise
global = updateUser(global, userId, result.user);
global = updateUserFullInfo(global, userId, result.fullInfo);
+ global = updateUsers(global, buildCollectionByKey(result.users, 'id'));
+ global = updateChats(global, buildCollectionByKey(result.chats, 'id'));
+
setGlobal(global);
if (withPhotos || (user.photos?.length && hasChangedPhoto)) {
actions.loadProfilePhotos({ profileId: userId });
diff --git a/src/global/actions/ui/misc.ts b/src/global/actions/ui/misc.ts
index dfef467f1..84790d1e2 100644
--- a/src/global/actions/ui/misc.ts
+++ b/src/global/actions/ui/misc.ts
@@ -743,6 +743,13 @@ addActionHandler('closeInviteViaLinkModal', (global, actions, payload): ActionRe
}, tabId);
});
+addActionHandler('setShouldCloseRightColumn', (global, actions, payload): ActionReturnType => {
+ const { value, tabId = getCurrentTabId() } = payload;
+ return updateTabState(global, {
+ shouldCloseRightColumn: value,
+ }, tabId);
+});
+
let prevIsScreenLocked: boolean | undefined;
let prevBlurredTabsCount: number = 0;
let onlineTimeout: number | undefined;
diff --git a/src/global/helpers/misc.ts b/src/global/helpers/misc.ts
index 27d0f3aba..b3f0b6f41 100644
--- a/src/global/helpers/misc.ts
+++ b/src/global/helpers/misc.ts
@@ -9,11 +9,13 @@ export function buildApiInputPrivacyRules(global: GlobalState, {
isUnspecified,
allowedIds,
blockedIds,
+ shouldAllowPremium,
}: {
visibility: PrivacyVisibility;
isUnspecified?: boolean;
allowedIds: string[];
blockedIds: string[];
+ shouldAllowPremium?: true;
}): ApiInputPrivacyRules {
const {
users: { byId: usersById },
@@ -30,6 +32,7 @@ export function buildApiInputPrivacyRules(global: GlobalState, {
allowedChats: allowedChatIds.map((chatId) => chatsById[chatId]).filter(Boolean),
blockedUsers: blockedUserIds.map((userId) => usersById[userId]).filter(Boolean),
blockedChats: blockedChatIds.map((chatId) => chatsById[chatId]).filter(Boolean),
+ shouldAllowPremium,
};
return rules;
diff --git a/src/global/types.ts b/src/global/types.ts
index c25f75bce..769f842ec 100644
--- a/src/global/types.ts
+++ b/src/global/types.ts
@@ -246,6 +246,7 @@ export type TabState = {
resultIds?: string[];
};
+ shouldCloseRightColumn?: boolean;
nextProfileTab?: ProfileTabType;
forceScrollProfileTab?: boolean;
nextSettingsScreen?: SettingsScreens;
@@ -1775,6 +1776,9 @@ export interface ActionPayloads {
updatePrivateLink: WithTabId | undefined;
resetManagementError: { chatId: string } & WithTabId;
+ setShouldCloseRightColumn: {
+ value?: boolean;
+ } & WithTabId;
requestChatUpdate: { chatId: string };
requestSavedDialogUpdate: { chatId: string };
loadChatJoinRequests: {
diff --git a/src/hooks/useChatContextActions.ts b/src/hooks/useChatContextActions.ts
index f5fcbd9bb..f7fd07aa4 100644
--- a/src/hooks/useChatContextActions.ts
+++ b/src/hooks/useChatContextActions.ts
@@ -22,6 +22,7 @@ const useChatContextActions = ({
canChangeFolder,
isSavedDialog,
currentUserId,
+ isPreview,
handleDelete,
handleMute,
handleChatFolderChange,
@@ -35,6 +36,7 @@ const useChatContextActions = ({
canChangeFolder?: boolean;
isSavedDialog?: boolean;
currentUserId?: string;
+ isPreview?: boolean;
handleDelete?: NoneToVoidFunction;
handleMute?: NoneToVoidFunction;
handleChatFolderChange: NoneToVoidFunction;
@@ -68,7 +70,7 @@ const useChatContextActions = ({
}, [chat, isSavedDialog, lang]);
return useMemo(() => {
- if (!chat) {
+ if (!chat || isPreview) {
return undefined;
}
@@ -178,6 +180,7 @@ const useChatContextActions = ({
}, [
chat, user, canChangeFolder, lang, handleChatFolderChange, isPinned, isInSearch, isMuted, currentUserId,
handleDelete, handleMute, handleReport, folderId, isSelf, isServiceNotifications, isSavedDialog, deleteTitle,
+ isPreview,
]);
};
diff --git a/src/lib/gramjs/errors/RPCErrorList.js b/src/lib/gramjs/errors/RPCErrorList.js
index 2b13eb748..edf934023 100644
--- a/src/lib/gramjs/errors/RPCErrorList.js
+++ b/src/lib/gramjs/errors/RPCErrorList.js
@@ -47,6 +47,14 @@ class FloodWaitError extends FloodError {
this.seconds = seconds;
}
}
+class FloodPremiumWaitError extends FloodWaitError {
+ constructor(args) {
+ const seconds = Number(args.capture || 0);
+ super(`A wait of ${seconds} seconds is required${RPCError._fmtRequest(args.request)}`);
+ this.message = `A wait of ${seconds} seconds is required${RPCError._fmtRequest(args.request)}`;
+ this.seconds = seconds;
+ }
+}
class MsgWaitError extends FloodError {
constructor(args) {
super(`Message failed to be sent.${RPCError._fmtRequest(args.request)}`);
@@ -97,6 +105,7 @@ const rpcErrorRe = [
[/FILE_MIGRATE_(\d+)/, FileMigrateError],
[/FLOOD_TEST_PHONE_WAIT_(\d+)/, FloodTestPhoneWaitError],
[/FLOOD_WAIT_(\d+)/, FloodWaitError],
+ [/FLOOD_PREMIUM_WAIT_(\d+)/, FloodPremiumWaitError],
[/MSG_WAIT_(.*)/, MsgWaitError],
[/PHONE_MIGRATE_(\d+)/, PhoneMigrateError],
[/SLOWMODE_WAIT_(\d+)/, SlowModeWaitError],
diff --git a/src/lib/gramjs/tl/AllTLObjects.js b/src/lib/gramjs/tl/AllTLObjects.js
index 6268ac97f..d9260efba 100644
--- a/src/lib/gramjs/tl/AllTLObjects.js
+++ b/src/lib/gramjs/tl/AllTLObjects.js
@@ -1,6 +1,6 @@
const api = require('./api');
-const LAYER = 176;
+const LAYER = 177;
const tlobjects = {};
for (const tl of Object.values(api)) {
diff --git a/src/lib/gramjs/tl/api.d.ts b/src/lib/gramjs/tl/api.d.ts
index 764b877aa..3895f6bd7 100644
--- a/src/lib/gramjs/tl/api.d.ts
+++ b/src/lib/gramjs/tl/api.d.ts
@@ -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 | MessageMediaStory | MessageMediaGiveaway | MessageMediaGiveawayResults;
- 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 | MessageActionTopicCreate | MessageActionTopicEdit | MessageActionSuggestProfilePhoto | MessageActionRequestedPeer | MessageActionSetChatWallPaper | MessageActionGiftCode | MessageActionGiveawayLaunch | MessageActionGiveawayResults | MessageActionBoostApply;
+ 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 | MessageActionTopicCreate | MessageActionTopicEdit | MessageActionSuggestProfilePhoto | MessageActionRequestedPeer | MessageActionSetChatWallPaper | MessageActionGiftCode | MessageActionGiveawayLaunch | MessageActionGiveawayResults | MessageActionBoostApply | MessageActionRequestedPeerSentMe;
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 | UpdateNewAuthorization | 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 | UpdateUserEmojiStatus | UpdateRecentEmojiStatuses | UpdateRecentReactions | UpdateMoveStickerSetToTop | UpdateMessageExtendedMedia | UpdateChannelPinnedTopic | UpdateChannelPinnedTopics | UpdateUser | UpdateAutoSaveSettings | UpdateGroupInvitePrivacyForbidden | UpdateStory | UpdateReadStories | UpdateStoryID | UpdateStoriesStealthMode | UpdateSentStoryReaction | UpdateBotChatBoost | UpdateChannelViewForumAsMessages | UpdatePeerWallpaper | UpdateBotMessageReaction | UpdateBotMessageReactions | UpdateSavedDialogPinned | UpdatePinnedSavedDialogs | UpdateSavedReactionTags | UpdateSmsJob | UpdateQuickReplies | UpdateNewQuickReply | UpdateDeleteQuickReply | UpdateQuickReplyMessage | UpdateDeleteQuickReplyMessages;
+ export type TypeUpdate = UpdateNewMessage | UpdateMessageID | UpdateDeleteMessages | UpdateUserTyping | UpdateChatUserTyping | UpdateChatParticipants | UpdateUserStatus | UpdateUserName | UpdateNewAuthorization | 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 | UpdateUserEmojiStatus | UpdateRecentEmojiStatuses | UpdateRecentReactions | UpdateMoveStickerSetToTop | UpdateMessageExtendedMedia | UpdateChannelPinnedTopic | UpdateChannelPinnedTopics | UpdateUser | UpdateAutoSaveSettings | UpdateStory | UpdateReadStories | UpdateStoryID | UpdateStoriesStealthMode | UpdateSentStoryReaction | UpdateBotChatBoost | UpdateChannelViewForumAsMessages | UpdatePeerWallpaper | UpdateBotMessageReaction | UpdateBotMessageReactions | UpdateSavedDialogPinned | UpdatePinnedSavedDialogs | UpdateSavedReactionTags | UpdateSmsJob | UpdateQuickReplies | UpdateNewQuickReply | UpdateDeleteQuickReply | UpdateQuickReplyMessage | UpdateDeleteQuickReplyMessages | UpdateBotBusinessConnect | UpdateBotNewBusinessMessage | UpdateBotEditBusinessMessage | UpdateBotDeleteBusinessMessage;
export type TypeUpdates = UpdatesTooLong | UpdateShortMessage | UpdateShortChatMessage | UpdateShort | UpdatesCombined | Updates | UpdateShortSentMessage;
export type TypeDcOption = DcOption;
export type TypeConfig = Config;
@@ -100,10 +100,10 @@ namespace Api {
export type TypeDocument = DocumentEmpty | Document;
export type TypeNotifyPeer = NotifyPeer | NotifyUsers | NotifyChats | NotifyBroadcasts | NotifyForumTopic;
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 | InputPrivacyKeyVoiceMessages | InputPrivacyKeyAbout;
- export type TypePrivacyKey = PrivacyKeyStatusTimestamp | PrivacyKeyChatInvite | PrivacyKeyPhoneCall | PrivacyKeyPhoneP2P | PrivacyKeyForwards | PrivacyKeyProfilePhoto | PrivacyKeyPhoneNumber | PrivacyKeyAddedByPhone | PrivacyKeyVoiceMessages | PrivacyKeyAbout;
- export type TypeInputPrivacyRule = InputPrivacyValueAllowContacts | InputPrivacyValueAllowAll | InputPrivacyValueAllowUsers | InputPrivacyValueDisallowContacts | InputPrivacyValueDisallowAll | InputPrivacyValueDisallowUsers | InputPrivacyValueAllowChatParticipants | InputPrivacyValueDisallowChatParticipants | InputPrivacyValueAllowCloseFriends;
- export type TypePrivacyRule = PrivacyValueAllowContacts | PrivacyValueAllowAll | PrivacyValueAllowUsers | PrivacyValueDisallowContacts | PrivacyValueDisallowAll | PrivacyValueDisallowUsers | PrivacyValueAllowChatParticipants | PrivacyValueDisallowChatParticipants | PrivacyValueAllowCloseFriends;
+ export type TypeInputPrivacyKey = InputPrivacyKeyStatusTimestamp | InputPrivacyKeyChatInvite | InputPrivacyKeyPhoneCall | InputPrivacyKeyPhoneP2P | InputPrivacyKeyForwards | InputPrivacyKeyProfilePhoto | InputPrivacyKeyPhoneNumber | InputPrivacyKeyAddedByPhone | InputPrivacyKeyVoiceMessages | InputPrivacyKeyAbout | InputPrivacyKeyBirthday;
+ export type TypePrivacyKey = PrivacyKeyStatusTimestamp | PrivacyKeyChatInvite | PrivacyKeyPhoneCall | PrivacyKeyPhoneP2P | PrivacyKeyForwards | PrivacyKeyProfilePhoto | PrivacyKeyPhoneNumber | PrivacyKeyAddedByPhone | PrivacyKeyVoiceMessages | PrivacyKeyAbout | PrivacyKeyBirthday;
+ export type TypeInputPrivacyRule = InputPrivacyValueAllowContacts | InputPrivacyValueAllowAll | InputPrivacyValueAllowUsers | InputPrivacyValueDisallowContacts | InputPrivacyValueDisallowAll | InputPrivacyValueDisallowUsers | InputPrivacyValueAllowChatParticipants | InputPrivacyValueDisallowChatParticipants | InputPrivacyValueAllowCloseFriends | InputPrivacyValueAllowPremium;
+ export type TypePrivacyRule = PrivacyValueAllowContacts | PrivacyValueAllowAll | PrivacyValueAllowUsers | PrivacyValueDisallowContacts | PrivacyValueDisallowAll | PrivacyValueDisallowUsers | PrivacyValueAllowChatParticipants | PrivacyValueDisallowChatParticipants | PrivacyValueAllowCloseFriends | PrivacyValueAllowPremium;
export type TypeAccountDaysTTL = AccountDaysTTL;
export type TypeDocumentAttribute = DocumentAttributeImageSize | DocumentAttributeAnimated | DocumentAttributeSticker | DocumentAttributeVideo | DocumentAttributeAudio | DocumentAttributeFilename | DocumentAttributeHasStickers | DocumentAttributeCustomEmoji;
export type TypeStickerPack = StickerPack;
@@ -116,7 +116,7 @@ namespace Api {
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 | KeyboardButtonRequestPeer;
+ export type TypeKeyboardButton = KeyboardButton | KeyboardButtonUrl | KeyboardButtonCallback | KeyboardButtonRequestPhone | KeyboardButtonRequestGeoLocation | KeyboardButtonSwitchInline | KeyboardButtonGame | KeyboardButtonBuy | KeyboardButtonUrlAuth | InputKeyboardButtonUrlAuth | KeyboardButtonRequestPoll | InputKeyboardButtonUserProfile | KeyboardButtonUserProfile | KeyboardButtonWebView | KeyboardButtonSimpleWebView | KeyboardButtonRequestPeer | InputKeyboardButtonRequestPeer;
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 | MessageEntityBankCard | MessageEntitySpoiler | MessageEntityCustomEmoji | MessageEntityBlockquote;
@@ -347,6 +347,20 @@ namespace Api {
export type TypeQuickReply = QuickReply;
export type TypeInputQuickReplyShortcut = InputQuickReplyShortcut | InputQuickReplyShortcutId;
export type TypeConnectedBot = ConnectedBot;
+ export type TypeBirthday = Birthday;
+ export type TypeBotBusinessConnection = BotBusinessConnection;
+ export type TypeInputBusinessIntro = InputBusinessIntro;
+ export type TypeBusinessIntro = BusinessIntro;
+ export type TypeInputCollectible = InputCollectibleUsername | InputCollectiblePhone;
+ export type TypeInputBusinessBotRecipients = InputBusinessBotRecipients;
+ export type TypeBusinessBotRecipients = BusinessBotRecipients;
+ export type TypeContactBirthday = ContactBirthday;
+ export type TypeMissingInvitee = MissingInvitee;
+ export type TypeInputBusinessChatLink = InputBusinessChatLink;
+ export type TypeBusinessChatLink = BusinessChatLink;
+ export type TypeRequestedPeer = RequestedPeerUser | RequestedPeerChat | RequestedPeerChannel;
+ export type TypeSponsoredMessageReportOption = SponsoredMessageReportOption;
+ export type TypeBroadcastRevenueTransaction = BroadcastRevenueTransactionProceeds | BroadcastRevenueTransactionWithdrawal | BroadcastRevenueTransactionRefund;
export type TypeResPQ = ResPQ;
export type TypeP_Q_inner_data = PQInnerData | PQInnerDataDc | PQInnerDataTemp | PQInnerDataTempDc;
export type TypeServer_DH_Params = ServerDHParamsFail | ServerDHParamsOk;
@@ -397,6 +411,7 @@ namespace Api {
export type TypeFound = contacts.Found;
export type TypeResolvedPeer = contacts.ResolvedPeer;
export type TypeTopPeers = contacts.TopPeersNotModified | contacts.TopPeers | contacts.TopPeersDisabled;
+ export type TypeContactBirthdays = contacts.ContactBirthdays;
}
export namespace messages {
@@ -453,6 +468,8 @@ namespace Api {
export type TypeSavedReactionTags = messages.SavedReactionTagsNotModified | messages.SavedReactionTags;
export type TypeQuickReplies = messages.QuickReplies | messages.QuickRepliesNotModified;
export type TypeDialogFilters = messages.DialogFilters;
+ export type TypeMyStickers = messages.MyStickers;
+ export type TypeInvitedUsers = messages.InvitedUsers;
}
export namespace updates {
@@ -518,6 +535,8 @@ namespace Api {
export type TypeEmailVerified = account.EmailVerified | account.EmailVerifiedLogin;
export type TypeAutoSaveSettings = account.AutoSaveSettings;
export type TypeConnectedBots = account.ConnectedBots;
+ export type TypeBusinessChatLinks = account.BusinessChatLinks;
+ export type TypeResolvedBusinessChatLinks = account.ResolvedBusinessChatLinks;
}
export namespace channels {
@@ -525,6 +544,7 @@ namespace Api {
export type TypeChannelParticipant = channels.ChannelParticipant;
export type TypeAdminLogResults = channels.AdminLogResults;
export type TypeSendAsPeers = channels.SendAsPeers;
+ export type TypeSponsoredMessageReportResult = channels.SponsoredMessageReportResultChooseOption | channels.SponsoredMessageReportResultAdsHidden | channels.SponsoredMessageReportResultReported;
}
export namespace payments {
@@ -555,6 +575,9 @@ namespace Api {
export type TypeMessageStats = stats.MessageStats;
export type TypeStoryStats = stats.StoryStats;
export type TypePublicForwards = stats.PublicForwards;
+ export type TypeBroadcastRevenueStats = stats.BroadcastRevenueStats;
+ export type TypeBroadcastRevenueWithdrawalUrl = stats.BroadcastRevenueWithdrawalUrl;
+ export type TypeBroadcastRevenueTransactions = stats.BroadcastRevenueTransactions;
}
export namespace stickers {
@@ -596,6 +619,10 @@ namespace Api {
export type TypeStatus = smsjobs.Status;
}
+ export namespace fragment {
+ export type TypeCollectibleInfo = fragment.CollectibleInfo;
+ }
+
export class InputPeerEmpty extends VirtualClass {};
export class InputPeerSelf extends VirtualClass {};
export class InputPeerChat extends VirtualClass<{
@@ -1062,6 +1089,7 @@ namespace Api {
storiesHidden?: true;
storiesUnavailable?: true;
contactRequirePremium?: true;
+ botBusiness?: true;
id: long;
accessHash?: long;
firstName?: string;
@@ -1105,6 +1133,7 @@ namespace Api {
storiesHidden?: true;
storiesUnavailable?: true;
contactRequirePremium?: true;
+ botBusiness?: true;
id: long;
accessHash?: long;
firstName?: string;
@@ -1382,6 +1411,8 @@ namespace Api {
translationsDisabled?: true;
storiesPinnedAvailable?: true;
viewForumAsMessages?: true;
+ restrictedSponsored?: true;
+ canViewRevenue?: true;
id: long;
about: string;
participantsCount?: int;
@@ -1439,6 +1470,8 @@ namespace Api {
translationsDisabled?: true;
storiesPinnedAvailable?: true;
viewForumAsMessages?: true;
+ restrictedSponsored?: true;
+ canViewRevenue?: true;
id: long;
about: string;
participantsCount?: int;
@@ -1557,6 +1590,8 @@ namespace Api {
pinned?: true;
noforwards?: true;
invertMedia?: true;
+ // flags2: undefined;
+ offline?: true;
id: int;
fromId?: Api.TypePeer;
fromBoostsApplied?: int;
@@ -1564,6 +1599,7 @@ namespace Api {
savedPeerId?: Api.TypePeer;
fwdFrom?: Api.TypeMessageFwdHeader;
viaBotId?: long;
+ viaBusinessBotId?: long;
replyTo?: Api.TypeMessageReplyHeader;
date: int;
message: string;
@@ -1593,6 +1629,8 @@ namespace Api {
pinned?: true;
noforwards?: true;
invertMedia?: true;
+ // flags2: undefined;
+ offline?: true;
id: int;
fromId?: Api.TypePeer;
fromBoostsApplied?: int;
@@ -1600,6 +1638,7 @@ namespace Api {
savedPeerId?: Api.TypePeer;
fwdFrom?: Api.TypeMessageFwdHeader;
viaBotId?: long;
+ viaBusinessBotId?: long;
replyTo?: Api.TypeMessageReplyHeader;
date: int;
message: string;
@@ -2146,6 +2185,13 @@ namespace Api {
}> {
boosts: int;
};
+ export class MessageActionRequestedPeerSentMe extends VirtualClass<{
+ buttonId: int;
+ peers: Api.TypeRequestedPeer[];
+ }> {
+ buttonId: int;
+ peers: Api.TypeRequestedPeer[];
+ };
export class Dialog extends VirtualClass<{
// flags: undefined;
pinned?: true;
@@ -2366,9 +2412,13 @@ namespace Api {
autoarchived?: true;
inviteMembers?: true;
requestChatBroadcast?: true;
+ businessBotPaused?: true;
+ businessBotCanReply?: true;
geoDistance?: int;
requestChatTitle?: string;
requestChatDate?: int;
+ businessBotId?: long;
+ businessBotManageUrl?: string;
} | void> {
// flags: undefined;
reportSpam?: true;
@@ -2380,9 +2430,13 @@ namespace Api {
autoarchived?: true;
inviteMembers?: true;
requestChatBroadcast?: true;
+ businessBotPaused?: true;
+ businessBotCanReply?: true;
geoDistance?: int;
requestChatTitle?: string;
requestChatDate?: int;
+ businessBotId?: long;
+ businessBotManageUrl?: string;
};
export class WallPaper extends VirtualClass<{
id: long;
@@ -2469,6 +2523,10 @@ namespace Api {
businessLocation?: Api.TypeBusinessLocation;
businessGreetingMessage?: Api.TypeBusinessGreetingMessage;
businessAwayMessage?: Api.TypeBusinessAwayMessage;
+ businessIntro?: Api.TypeBusinessIntro;
+ birthday?: Api.TypeBirthday;
+ personalChannelId?: long;
+ personalChannelMessage?: int;
}> {
// flags: undefined;
blocked?: true;
@@ -2508,6 +2566,10 @@ namespace Api {
businessLocation?: Api.TypeBusinessLocation;
businessGreetingMessage?: Api.TypeBusinessGreetingMessage;
businessAwayMessage?: Api.TypeBusinessAwayMessage;
+ businessIntro?: Api.TypeBusinessIntro;
+ birthday?: Api.TypeBirthday;
+ personalChannelId?: long;
+ personalChannelMessage?: int;
};
export class Contact extends VirtualClass<{
userId: long;
@@ -3510,11 +3572,6 @@ namespace Api {
userId: long;
};
export class UpdateAutoSaveSettings extends VirtualClass {};
- export class UpdateGroupInvitePrivacyForbidden extends VirtualClass<{
- userId: long;
- }> {
- userId: long;
- };
export class UpdateStory extends VirtualClass<{
peer: Api.TypePeer;
story: Api.TypeStoryItem;
@@ -3656,6 +3713,50 @@ namespace Api {
shortcutId: int;
messages: int[];
};
+ export class UpdateBotBusinessConnect extends VirtualClass<{
+ connection: Api.TypeBotBusinessConnection;
+ qts: int;
+ }> {
+ connection: Api.TypeBotBusinessConnection;
+ qts: int;
+ };
+ export class UpdateBotNewBusinessMessage extends VirtualClass<{
+ // flags: undefined;
+ connectionId: string;
+ message: Api.TypeMessage;
+ replyToMessage?: Api.TypeMessage;
+ qts: int;
+ }> {
+ // flags: undefined;
+ connectionId: string;
+ message: Api.TypeMessage;
+ replyToMessage?: Api.TypeMessage;
+ qts: int;
+ };
+ export class UpdateBotEditBusinessMessage extends VirtualClass<{
+ // flags: undefined;
+ connectionId: string;
+ message: Api.TypeMessage;
+ replyToMessage?: Api.TypeMessage;
+ qts: int;
+ }> {
+ // flags: undefined;
+ connectionId: string;
+ message: Api.TypeMessage;
+ replyToMessage?: Api.TypeMessage;
+ qts: int;
+ };
+ export class UpdateBotDeleteBusinessMessage extends VirtualClass<{
+ connectionId: string;
+ peer: Api.TypePeer;
+ messages: int[];
+ qts: int;
+ }> {
+ connectionId: string;
+ peer: Api.TypePeer;
+ messages: int[];
+ qts: int;
+ };
export class UpdatesTooLong extends VirtualClass {};
export class UpdateShortMessage extends VirtualClass<{
// flags: undefined;
@@ -4173,6 +4274,7 @@ namespace Api {
export class InputPrivacyKeyAddedByPhone extends VirtualClass {};
export class InputPrivacyKeyVoiceMessages extends VirtualClass {};
export class InputPrivacyKeyAbout extends VirtualClass {};
+ export class InputPrivacyKeyBirthday extends VirtualClass {};
export class PrivacyKeyStatusTimestamp extends VirtualClass {};
export class PrivacyKeyChatInvite extends VirtualClass {};
export class PrivacyKeyPhoneCall extends VirtualClass {};
@@ -4183,6 +4285,7 @@ namespace Api {
export class PrivacyKeyAddedByPhone extends VirtualClass {};
export class PrivacyKeyVoiceMessages extends VirtualClass {};
export class PrivacyKeyAbout extends VirtualClass {};
+ export class PrivacyKeyBirthday extends VirtualClass {};
export class InputPrivacyValueAllowContacts extends VirtualClass {};
export class InputPrivacyValueAllowAll extends VirtualClass {};
export class InputPrivacyValueAllowUsers extends VirtualClass<{
@@ -4208,6 +4311,7 @@ namespace Api {
chats: long[];
};
export class InputPrivacyValueAllowCloseFriends extends VirtualClass {};
+ export class InputPrivacyValueAllowPremium extends VirtualClass {};
export class PrivacyValueAllowContacts extends VirtualClass {};
export class PrivacyValueAllowAll extends VirtualClass {};
export class PrivacyValueAllowUsers extends VirtualClass<{
@@ -4233,6 +4337,7 @@ namespace Api {
chats: long[];
};
export class PrivacyValueAllowCloseFriends extends VirtualClass {};
+ export class PrivacyValueAllowPremium extends VirtualClass {};
export class AccountDaysTTL extends VirtualClass<{
days: int;
}> {
@@ -4542,11 +4647,10 @@ namespace Api {
archived?: true;
official?: true;
masks?: true;
- animated?: true;
- videos?: true;
emojis?: true;
textColor?: true;
channelEmojiStatus?: true;
+ creator?: true;
installedDate?: int;
id: long;
accessHash: long;
@@ -4563,11 +4667,10 @@ namespace Api {
archived?: true;
official?: true;
masks?: true;
- animated?: true;
- videos?: true;
emojis?: true;
textColor?: true;
channelEmojiStatus?: true;
+ creator?: true;
installedDate?: int;
id: long;
accessHash: long;
@@ -4736,6 +4839,25 @@ namespace Api {
peerType: Api.TypeRequestPeerType;
maxQuantity: int;
};
+ export class InputKeyboardButtonRequestPeer extends VirtualClass<{
+ // flags: undefined;
+ nameRequested?: true;
+ usernameRequested?: true;
+ photoRequested?: true;
+ text: string;
+ buttonId: int;
+ peerType: Api.TypeRequestPeerType;
+ maxQuantity: int;
+ }> {
+ // flags: undefined;
+ nameRequested?: true;
+ usernameRequested?: true;
+ photoRequested?: true;
+ text: string;
+ buttonId: int;
+ peerType: Api.TypeRequestPeerType;
+ maxQuantity: int;
+ };
export class KeyboardButtonRow extends VirtualClass<{
buttons: Api.TypeKeyboardButton[];
}> {
@@ -6236,6 +6358,7 @@ namespace Api {
protocol: Api.TypePhoneCallProtocol;
connections: Api.TypePhoneConnection[];
startDate: int;
+ customParameters?: Api.TypeDataJSON;
}> {
// flags: undefined;
p2pAllowed?: true;
@@ -6250,6 +6373,7 @@ namespace Api {
protocol: Api.TypePhoneCallProtocol;
connections: Api.TypePhoneConnection[];
startDate: int;
+ customParameters?: Api.TypeDataJSON;
};
export class PhoneCallDiscarded extends VirtualClass<{
// flags: undefined;
@@ -8177,6 +8301,7 @@ namespace Api {
// flags: undefined;
recommended?: true;
showPeerPhoto?: true;
+ canReport?: true;
randomId: bytes;
fromId?: Api.TypePeer;
chatInvite?: Api.TypeChatInvite;
@@ -8194,6 +8319,7 @@ namespace Api {
// flags: undefined;
recommended?: true;
showPeerPhoto?: true;
+ canReport?: true;
randomId: bytes;
fromId?: Api.TypePeer;
chatInvite?: Api.TypeChatInvite;
@@ -9462,12 +9588,237 @@ namespace Api {
// flags: undefined;
canReply?: true;
botId: long;
- recipients: Api.TypeBusinessRecipients;
+ recipients: Api.TypeBusinessBotRecipients;
}> {
// flags: undefined;
canReply?: true;
botId: long;
- recipients: Api.TypeBusinessRecipients;
+ recipients: Api.TypeBusinessBotRecipients;
+ };
+ export class Birthday extends VirtualClass<{
+ // flags: undefined;
+ day: int;
+ month: int;
+ year?: int;
+ }> {
+ // flags: undefined;
+ day: int;
+ month: int;
+ year?: int;
+ };
+ export class BotBusinessConnection extends VirtualClass<{
+ // flags: undefined;
+ canReply?: true;
+ disabled?: true;
+ connectionId: string;
+ userId: long;
+ dcId: int;
+ date: int;
+ }> {
+ // flags: undefined;
+ canReply?: true;
+ disabled?: true;
+ connectionId: string;
+ userId: long;
+ dcId: int;
+ date: int;
+ };
+ export class InputBusinessIntro extends VirtualClass<{
+ // flags: undefined;
+ title: string;
+ description: string;
+ sticker?: Api.TypeInputDocument;
+ }> {
+ // flags: undefined;
+ title: string;
+ description: string;
+ sticker?: Api.TypeInputDocument;
+ };
+ export class BusinessIntro extends VirtualClass<{
+ // flags: undefined;
+ title: string;
+ description: string;
+ sticker?: Api.TypeDocument;
+ }> {
+ // flags: undefined;
+ title: string;
+ description: string;
+ sticker?: Api.TypeDocument;
+ };
+ export class InputCollectibleUsername extends VirtualClass<{
+ username: string;
+ }> {
+ username: string;
+ };
+ export class InputCollectiblePhone extends VirtualClass<{
+ phone: string;
+ }> {
+ phone: string;
+ };
+ export class InputBusinessBotRecipients extends VirtualClass<{
+ // flags: undefined;
+ existingChats?: true;
+ newChats?: true;
+ contacts?: true;
+ nonContacts?: true;
+ excludeSelected?: true;
+ users?: Api.TypeInputUser[];
+ excludeUsers?: Api.TypeInputUser[];
+ } | void> {
+ // flags: undefined;
+ existingChats?: true;
+ newChats?: true;
+ contacts?: true;
+ nonContacts?: true;
+ excludeSelected?: true;
+ users?: Api.TypeInputUser[];
+ excludeUsers?: Api.TypeInputUser[];
+ };
+ export class BusinessBotRecipients extends VirtualClass<{
+ // flags: undefined;
+ existingChats?: true;
+ newChats?: true;
+ contacts?: true;
+ nonContacts?: true;
+ excludeSelected?: true;
+ users?: long[];
+ excludeUsers?: long[];
+ } | void> {
+ // flags: undefined;
+ existingChats?: true;
+ newChats?: true;
+ contacts?: true;
+ nonContacts?: true;
+ excludeSelected?: true;
+ users?: long[];
+ excludeUsers?: long[];
+ };
+ export class ContactBirthday extends VirtualClass<{
+ contactId: long;
+ birthday: Api.TypeBirthday;
+ }> {
+ contactId: long;
+ birthday: Api.TypeBirthday;
+ };
+ export class MissingInvitee extends VirtualClass<{
+ // flags: undefined;
+ premiumWouldAllowInvite?: true;
+ premiumRequiredForPm?: true;
+ userId: long;
+ }> {
+ // flags: undefined;
+ premiumWouldAllowInvite?: true;
+ premiumRequiredForPm?: true;
+ userId: long;
+ };
+ export class InputBusinessChatLink extends VirtualClass<{
+ // flags: undefined;
+ message: string;
+ entities?: Api.TypeMessageEntity[];
+ title?: string;
+ }> {
+ // flags: undefined;
+ message: string;
+ entities?: Api.TypeMessageEntity[];
+ title?: string;
+ };
+ export class BusinessChatLink extends VirtualClass<{
+ // flags: undefined;
+ link: string;
+ message: string;
+ entities?: Api.TypeMessageEntity[];
+ title?: string;
+ views: int;
+ }> {
+ // flags: undefined;
+ link: string;
+ message: string;
+ entities?: Api.TypeMessageEntity[];
+ title?: string;
+ views: int;
+ };
+ export class RequestedPeerUser extends VirtualClass<{
+ // flags: undefined;
+ userId: long;
+ firstName?: string;
+ lastName?: string;
+ username?: string;
+ photo?: Api.TypePhoto;
+ }> {
+ // flags: undefined;
+ userId: long;
+ firstName?: string;
+ lastName?: string;
+ username?: string;
+ photo?: Api.TypePhoto;
+ };
+ export class RequestedPeerChat extends VirtualClass<{
+ // flags: undefined;
+ chatId: long;
+ title?: string;
+ photo?: Api.TypePhoto;
+ }> {
+ // flags: undefined;
+ chatId: long;
+ title?: string;
+ photo?: Api.TypePhoto;
+ };
+ export class RequestedPeerChannel extends VirtualClass<{
+ // flags: undefined;
+ channelId: long;
+ title?: string;
+ username?: string;
+ photo?: Api.TypePhoto;
+ }> {
+ // flags: undefined;
+ channelId: long;
+ title?: string;
+ username?: string;
+ photo?: Api.TypePhoto;
+ };
+ export class SponsoredMessageReportOption extends VirtualClass<{
+ text: string;
+ option: bytes;
+ }> {
+ text: string;
+ option: bytes;
+ };
+ export class BroadcastRevenueTransactionProceeds extends VirtualClass<{
+ amount: long;
+ fromDate: int;
+ toDate: int;
+ }> {
+ amount: long;
+ fromDate: int;
+ toDate: int;
+ };
+ export class BroadcastRevenueTransactionWithdrawal extends VirtualClass<{
+ // flags: undefined;
+ pending?: true;
+ failed?: true;
+ amount: long;
+ date: int;
+ provider: string;
+ transactionDate?: int;
+ transactionUrl?: string;
+ }> {
+ // flags: undefined;
+ pending?: true;
+ failed?: true;
+ amount: long;
+ date: int;
+ provider: string;
+ transactionDate?: int;
+ transactionUrl?: string;
+ };
+ export class BroadcastRevenueTransactionRefund extends VirtualClass<{
+ amount: long;
+ date: int;
+ provider: string;
+ }> {
+ amount: long;
+ date: int;
+ provider: string;
};
export class ResPQ extends VirtualClass<{
nonce: int128;
@@ -10065,6 +10416,13 @@ namespace Api {
users: Api.TypeUser[];
};
export class TopPeersDisabled extends VirtualClass {};
+ export class ContactBirthdays extends VirtualClass<{
+ contacts: Api.TypeContactBirthday[];
+ users: Api.TypeUser[];
+ }> {
+ contacts: Api.TypeContactBirthday[];
+ users: Api.TypeUser[];
+ };
}
export namespace messages {
@@ -10727,6 +11085,20 @@ namespace Api {
tagsEnabled?: true;
filters: Api.TypeDialogFilter[];
};
+ export class MyStickers extends VirtualClass<{
+ count: int;
+ sets: Api.TypeStickerSetCovered[];
+ }> {
+ count: int;
+ sets: Api.TypeStickerSetCovered[];
+ };
+ export class InvitedUsers extends VirtualClass<{
+ updates: Api.TypeUpdates;
+ missingInvitees: Api.TypeMissingInvitee[];
+ }> {
+ updates: Api.TypeUpdates;
+ missingInvitees: Api.TypeMissingInvitee[];
+ };
}
export namespace updates {
@@ -11369,6 +11741,30 @@ namespace Api {
connectedBots: Api.TypeConnectedBot[];
users: Api.TypeUser[];
};
+ export class BusinessChatLinks extends VirtualClass<{
+ links: Api.TypeBusinessChatLink[];
+ chats: Api.TypeChat[];
+ users: Api.TypeUser[];
+ }> {
+ links: Api.TypeBusinessChatLink[];
+ chats: Api.TypeChat[];
+ users: Api.TypeUser[];
+ };
+ export class ResolvedBusinessChatLinks extends VirtualClass<{
+ // flags: undefined;
+ peer: Api.TypePeer;
+ message: string;
+ entities?: Api.TypeMessageEntity[];
+ chats: Api.TypeChat[];
+ users: Api.TypeUser[];
+ }> {
+ // flags: undefined;
+ peer: Api.TypePeer;
+ message: string;
+ entities?: Api.TypeMessageEntity[];
+ chats: Api.TypeChat[];
+ users: Api.TypeUser[];
+ };
}
export namespace channels {
@@ -11411,6 +11807,15 @@ namespace Api {
chats: Api.TypeChat[];
users: Api.TypeUser[];
};
+ export class SponsoredMessageReportResultChooseOption extends VirtualClass<{
+ title: string;
+ options: Api.TypeSponsoredMessageReportOption[];
+ }> {
+ title: string;
+ options: Api.TypeSponsoredMessageReportOption[];
+ };
+ export class SponsoredMessageReportResultAdsHidden extends VirtualClass {};
+ export class SponsoredMessageReportResultReported extends VirtualClass {};
}
export namespace payments {
@@ -11763,6 +12168,33 @@ namespace Api {
chats: Api.TypeChat[];
users: Api.TypeUser[];
};
+ export class BroadcastRevenueStats extends VirtualClass<{
+ topHoursGraph: Api.TypeStatsGraph;
+ revenueGraph: Api.TypeStatsGraph;
+ currentBalance: long;
+ availableBalance: long;
+ overallRevenue: long;
+ usdRate: double;
+ }> {
+ topHoursGraph: Api.TypeStatsGraph;
+ revenueGraph: Api.TypeStatsGraph;
+ currentBalance: long;
+ availableBalance: long;
+ overallRevenue: long;
+ usdRate: double;
+ };
+ export class BroadcastRevenueWithdrawalUrl extends VirtualClass<{
+ url: string;
+ }> {
+ url: string;
+ };
+ export class BroadcastRevenueTransactions extends VirtualClass<{
+ count: int;
+ transactions: Api.TypeBroadcastRevenueTransaction[];
+ }> {
+ count: int;
+ transactions: Api.TypeBroadcastRevenueTransaction[];
+ };
}
export namespace stickers {
@@ -12028,6 +12460,24 @@ namespace Api {
};
}
+ export namespace fragment {
+ export class CollectibleInfo extends VirtualClass<{
+ purchaseDate: int;
+ currency: string;
+ amount: long;
+ cryptoCurrency: string;
+ cryptoAmount: long;
+ url: string;
+ }> {
+ purchaseDate: int;
+ currency: string;
+ amount: long;
+ cryptoCurrency: string;
+ cryptoAmount: long;
+ url: string;
+ };
+ }
+
export class InvokeAfterMsg extends Request, X> {
+ connectionId: string;
+ query: X;
+ };
export class ReqPq extends Request, Api.TypeResPQ> {
@@ -12943,15 +13400,74 @@ namespace Api {
canReply?: true;
deleted?: true;
bot: Api.TypeInputUser;
- recipients: Api.TypeInputBusinessRecipients;
+ recipients: Api.TypeInputBusinessBotRecipients;
}>, Api.TypeUpdates> {
// flags: undefined;
canReply?: true;
deleted?: true;
bot: Api.TypeInputUser;
- recipients: Api.TypeInputBusinessRecipients;
+ recipients: Api.TypeInputBusinessBotRecipients;
};
export class GetConnectedBots extends Request {};
+ export class GetBotBusinessConnection extends Request, Api.TypeUpdates> {
+ connectionId: string;
+ };
+ export class UpdateBusinessIntro extends Request, Bool> {
+ // flags: undefined;
+ intro?: Api.TypeInputBusinessIntro;
+ };
+ export class ToggleConnectedBotPaused extends Request, Bool> {
+ peer: Api.TypeInputPeer;
+ paused: Bool;
+ };
+ export class DisablePeerConnectedBot extends Request, Bool> {
+ peer: Api.TypeInputPeer;
+ };
+ export class UpdateBirthday extends Request, Bool> {
+ // flags: undefined;
+ birthday?: Api.TypeBirthday;
+ };
+ export class CreateBusinessChatLink extends Request, Api.TypeBusinessChatLink> {
+ link: Api.TypeInputBusinessChatLink;
+ };
+ export class EditBusinessChatLink extends Request, Api.TypeBusinessChatLink> {
+ slug: string;
+ link: Api.TypeInputBusinessChatLink;
+ };
+ export class DeleteBusinessChatLink extends Request, Bool> {
+ slug: string;
+ };
+ export class GetBusinessChatLinks extends Request {};
+ export class ResolveBusinessChatLink extends Request, account.TypeResolvedBusinessChatLinks> {
+ slug: string;
+ };
+ export class UpdatePersonalChannel extends Request, Bool> {
+ channel: Api.TypeInputChannel;
+ };
}
export namespace users {
@@ -13159,6 +13675,7 @@ namespace Api {
id: Api.TypeInputPeer[];
limit: int;
};
+ export class GetBirthdays extends Request {};
}
export namespace messages {
@@ -13445,7 +13962,7 @@ namespace Api {
chatId: long;
userId: Api.TypeInputUser;
fwdLimit: int;
- }>, Api.TypeUpdates> {
+ }>, messages.TypeInvitedUsers> {
chatId: long;
userId: Api.TypeInputUser;
fwdLimit: int;
@@ -13466,7 +13983,7 @@ namespace Api {
users: Api.TypeInputUser[];
title: string;
ttlPeriod?: int;
- }>, Api.TypeUpdates> {
+ }>, messages.TypeInvitedUsers> {
// flags: undefined;
users: Api.TypeInputUser[];
title: string;
@@ -14071,9 +14588,13 @@ namespace Api {
error?: string;
};
export class UploadMedia extends Request, Api.TypeMessageMedia> {
+ // flags: undefined;
+ businessConnectionId?: string;
peer: Api.TypeInputPeer;
media: Api.TypeInputMedia;
};
@@ -15163,9 +15684,13 @@ namespace Api {
export class SendQuickReplyMessages extends Request, Api.TypeUpdates> {
peer: Api.TypeInputPeer;
shortcutId: int;
+ id: int[];
+ randomId: long[];
};
export class DeleteQuickReplyMessages extends Request, Bool> {
enabled: Bool;
};
+ export class GetMyStickers extends Request, messages.TypeMyStickers> {
+ offsetId: long;
+ limit: int;
+ };
}
export namespace updates {
@@ -15598,7 +16130,7 @@ namespace Api {
export class InviteToChannel extends Request, Api.TypeUpdates> {
+ }>, messages.TypeInvitedUsers> {
channel: Api.TypeInputChannel;
users: Api.TypeInputUser[];
};
@@ -15631,10 +16163,12 @@ namespace Api {
// flags: undefined;
byLocation?: true;
checkLimit?: true;
+ forPersonal?: true;
} | void>, messages.TypeChats> {
// flags: undefined;
byLocation?: true;
checkLimit?: true;
+ forPersonal?: true;
};
export class EditBanned extends Request, channels.TypeSponsoredMessageReportResult> {
+ channel: Api.TypeInputChannel;
+ randomId: bytes;
+ option: bytes;
+ };
+ export class RestrictSponsoredMessages extends Request, Api.TypeUpdates> {
+ channel: Api.TypeInputChannel;
+ restricted: Bool;
+ };
}
export namespace bots {
@@ -16211,8 +16761,6 @@ namespace Api {
export class CreateStickerSet extends Request, messages.TypeStickerSet> {
// flags: undefined;
masks?: true;
- animated?: true;
- videos?: true;
emojis?: true;
textColor?: true;
userId: Api.TypeInputUser;
@@ -16300,6 +16846,13 @@ namespace Api {
}>, Bool> {
stickerset: Api.TypeInputStickerSet;
};
+ export class ReplaceSticker extends Request, messages.TypeStickerSet> {
+ sticker: Api.TypeInputDocument;
+ newSticker: Api.TypeInputStickerSetItem;
+ };
}
export namespace phone {
@@ -16704,6 +17257,31 @@ namespace Api {
offset: string;
limit: int;
};
+ export class GetBroadcastRevenueStats extends Request, stats.TypeBroadcastRevenueStats> {
+ // flags: undefined;
+ dark?: true;
+ channel: Api.TypeInputChannel;
+ };
+ export class GetBroadcastRevenueWithdrawalUrl extends Request, stats.TypeBroadcastRevenueWithdrawalUrl> {
+ channel: Api.TypeInputChannel;
+ password: Api.TypeInputCheckPasswordSRP;
+ };
+ export class GetBroadcastRevenueTransactions extends Request, stats.TypeBroadcastRevenueTransactions> {
+ channel: Api.TypeInputChannel;
+ offset: int;
+ limit: int;
+ };
}
export namespace chatlists {
@@ -17083,27 +17661,36 @@ namespace Api {
};
}
- export type AnyRequest = InvokeAfterMsg | InvokeAfterMsgs | InitConnection | InvokeWithLayer | InvokeWithoutUpdates | InvokeWithMessagesRange | InvokeWithTakeout | ReqPq | ReqPqMulti | ReqPqMultiNew | ReqDHParams | SetClientDHParams | DestroyAuthKey | RpcDropAnswer | GetFutureSalts | Ping | PingDelayDisconnect | DestroySession
+ export namespace fragment {
+ export class GetCollectibleInfo extends Request, fragment.TypeCollectibleInfo> {
+ collectible: Api.TypeInputCollectible;
+ };
+ }
+
+ export type AnyRequest = InvokeAfterMsg | InvokeAfterMsgs | InitConnection | InvokeWithLayer | InvokeWithoutUpdates | InvokeWithMessagesRange | InvokeWithTakeout | InvokeWithBusinessConnection | ReqPq | ReqPqMulti | ReqPqMultiNew | ReqDHParams | SetClientDHParams | DestroyAuthKey | RpcDropAnswer | GetFutureSalts | Ping | PingDelayDisconnect | DestroySession
| auth.SendCode | auth.SignUp | auth.SignIn | auth.LogOut | auth.ResetAuthorizations | auth.ExportAuthorization | auth.ImportAuthorization | auth.BindTempAuthKey | auth.ImportBotAuthorization | auth.CheckPassword | auth.RequestPasswordRecovery | auth.RecoverPassword | auth.ResendCode | auth.CancelCode | auth.DropTempAuthKeys | auth.ExportLoginToken | auth.ImportLoginToken | auth.AcceptLoginToken | auth.CheckRecoveryPassword | auth.ImportWebTokenAuthorization | auth.RequestFirebaseSms | auth.ResetLoginEmail
- | 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 | account.UpdateEmojiStatus | account.GetDefaultEmojiStatuses | account.GetRecentEmojiStatuses | account.ClearRecentEmojiStatuses | account.ReorderUsernames | account.ToggleUsername | account.GetDefaultProfilePhotoEmojis | account.GetDefaultGroupPhotoEmojis | account.GetAutoSaveSettings | account.SaveAutoSaveSettings | account.DeleteAutoSaveExceptions | account.InvalidateSignInCodes | account.UpdateColor | account.GetDefaultBackgroundEmojis | account.GetChannelDefaultEmojiStatuses | account.GetChannelRestrictedStatusEmojis | account.UpdateBusinessWorkHours | account.UpdateBusinessLocation | account.UpdateBusinessGreetingMessage | account.UpdateBusinessAwayMessage | account.UpdateConnectedBot | account.GetConnectedBots
+ | 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 | account.UpdateEmojiStatus | account.GetDefaultEmojiStatuses | account.GetRecentEmojiStatuses | account.ClearRecentEmojiStatuses | account.ReorderUsernames | account.ToggleUsername | account.GetDefaultProfilePhotoEmojis | account.GetDefaultGroupPhotoEmojis | account.GetAutoSaveSettings | account.SaveAutoSaveSettings | account.DeleteAutoSaveExceptions | account.InvalidateSignInCodes | account.UpdateColor | account.GetDefaultBackgroundEmojis | account.GetChannelDefaultEmojiStatuses | account.GetChannelRestrictedStatusEmojis | account.UpdateBusinessWorkHours | account.UpdateBusinessLocation | account.UpdateBusinessGreetingMessage | account.UpdateBusinessAwayMessage | account.UpdateConnectedBot | account.GetConnectedBots | account.GetBotBusinessConnection | account.UpdateBusinessIntro | account.ToggleConnectedBotPaused | account.DisablePeerConnectedBot | account.UpdateBirthday | account.CreateBusinessChatLink | account.EditBusinessChatLink | account.DeleteBusinessChatLink | account.GetBusinessChatLinks | account.ResolveBusinessChatLink | account.UpdatePersonalChannel
| users.GetUsers | users.GetFullUser | users.SetSecureValueErrors | users.GetIsPremiumRequiredToContact
- | 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 | contacts.ExportContactToken | contacts.ImportContactToken | contacts.EditCloseFriends | contacts.SetBlocked
- | 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.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 | messages.ReportReaction | messages.GetTopReactions | messages.GetRecentReactions | messages.ClearRecentReactions | messages.GetExtendedMedia | messages.SetDefaultHistoryTTL | messages.GetDefaultHistoryTTL | messages.SendBotRequestedPeer | messages.GetEmojiGroups | messages.GetEmojiStatusGroups | messages.GetEmojiProfilePhotoGroups | messages.SearchCustomEmoji | messages.TogglePeerTranslations | messages.GetBotApp | messages.RequestAppWebView | messages.SetChatWallPaper | messages.SearchEmojiStickerSets | messages.GetSavedDialogs | messages.GetSavedHistory | messages.DeleteSavedHistory | messages.GetPinnedSavedDialogs | messages.ToggleSavedDialogPin | messages.ReorderPinnedSavedDialogs | messages.GetSavedReactionTags | messages.UpdateSavedReactionTag | messages.GetDefaultTagReactions | messages.GetOutboxReadDate | messages.GetQuickReplies | messages.ReorderQuickReplies | messages.CheckQuickReplyShortcut | messages.EditQuickReplyShortcut | messages.DeleteQuickReplyShortcut | messages.GetQuickReplyMessages | messages.SendQuickReplyMessages | messages.DeleteQuickReplyMessages | messages.ToggleDialogFilterTags
+ | 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 | contacts.ExportContactToken | contacts.ImportContactToken | contacts.EditCloseFriends | contacts.SetBlocked | contacts.GetBirthdays
+ | 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.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 | messages.ReportReaction | messages.GetTopReactions | messages.GetRecentReactions | messages.ClearRecentReactions | messages.GetExtendedMedia | messages.SetDefaultHistoryTTL | messages.GetDefaultHistoryTTL | messages.SendBotRequestedPeer | messages.GetEmojiGroups | messages.GetEmojiStatusGroups | messages.GetEmojiProfilePhotoGroups | messages.SearchCustomEmoji | messages.TogglePeerTranslations | messages.GetBotApp | messages.RequestAppWebView | messages.SetChatWallPaper | messages.SearchEmojiStickerSets | messages.GetSavedDialogs | messages.GetSavedHistory | messages.DeleteSavedHistory | messages.GetPinnedSavedDialogs | messages.ToggleSavedDialogPin | messages.ReorderPinnedSavedDialogs | messages.GetSavedReactionTags | messages.UpdateSavedReactionTag | messages.GetDefaultTagReactions | messages.GetOutboxReadDate | messages.GetQuickReplies | messages.ReorderQuickReplies | messages.CheckQuickReplyShortcut | messages.EditQuickReplyShortcut | messages.DeleteQuickReplyShortcut | messages.GetQuickReplyMessages | messages.SendQuickReplyMessages | messages.DeleteQuickReplyMessages | messages.ToggleDialogFilterTags | messages.GetMyStickers
| updates.GetState | updates.GetDifference | updates.GetChannelDifference
| photos.UpdateProfilePhoto | photos.UploadProfilePhoto | photos.DeletePhotos | photos.GetUserPhotos | photos.UploadContactProfilePhoto
| 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.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 | help.GetPeerColors | help.GetPeerProfileColors | help.GetTimezonesList
- | 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 | channels.ReorderUsernames | channels.ToggleUsername | channels.DeactivateAllUsernames | channels.ToggleForum | channels.CreateForumTopic | channels.GetForumTopics | channels.GetForumTopicsByID | channels.EditForumTopic | channels.UpdatePinnedForumTopic | channels.DeleteTopicHistory | channels.ReorderPinnedForumTopics | channels.ToggleAntiSpam | channels.ReportAntiSpamFalsePositive | channels.ToggleParticipantsHidden | channels.ClickSponsoredMessage | channels.UpdateColor | channels.ToggleViewForumAsMessages | channels.GetChannelRecommendations | channels.UpdateEmojiStatus | channels.SetBoostsToUnblockRestrictions | channels.SetEmojiStickers
+ | 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 | channels.ReorderUsernames | channels.ToggleUsername | channels.DeactivateAllUsernames | channels.ToggleForum | channels.CreateForumTopic | channels.GetForumTopics | channels.GetForumTopicsByID | channels.EditForumTopic | channels.UpdatePinnedForumTopic | channels.DeleteTopicHistory | channels.ReorderPinnedForumTopics | channels.ToggleAntiSpam | channels.ReportAntiSpamFalsePositive | channels.ToggleParticipantsHidden | channels.ClickSponsoredMessage | channels.UpdateColor | channels.ToggleViewForumAsMessages | channels.GetChannelRecommendations | channels.UpdateEmojiStatus | channels.SetBoostsToUnblockRestrictions | channels.SetEmojiStickers | channels.ReportSponsoredMessage | channels.RestrictSponsoredMessages
| bots.SendCustomRequest | bots.AnswerWebhookJSONQuery | bots.SetBotCommands | bots.ResetBotCommands | bots.GetBotCommands | bots.SetBotMenuButton | bots.GetBotMenuButton | bots.SetBotBroadcastDefaultAdminRights | bots.SetBotGroupDefaultAdminRights | bots.SetBotInfo | bots.GetBotInfo | bots.ReorderUsernames | bots.ToggleUsername | bots.CanSendMessage | bots.AllowSendMessage | bots.InvokeWebViewCustomMethod
| payments.GetPaymentForm | payments.GetPaymentReceipt | payments.ValidateRequestedInfo | payments.SendPaymentForm | payments.GetSavedInfo | payments.ClearSavedInfo | payments.GetBankCardData | payments.ExportInvoice | payments.AssignAppStoreTransaction | payments.AssignPlayMarketTransaction | payments.CanPurchasePremium | payments.GetPremiumGiftCodeOptions | payments.CheckGiftCode | payments.ApplyGiftCode | payments.GetGiveawayInfo | payments.LaunchPrepaidGiveaway
- | stickers.CreateStickerSet | stickers.RemoveStickerFromSet | stickers.ChangeStickerPosition | stickers.AddStickerToSet | stickers.SetStickerSetThumb | stickers.CheckShortName | stickers.SuggestShortName | stickers.ChangeSticker | stickers.RenameStickerSet | stickers.DeleteStickerSet
+ | stickers.CreateStickerSet | stickers.RemoveStickerFromSet | stickers.ChangeStickerPosition | stickers.AddStickerToSet | stickers.SetStickerSetThumb | stickers.CheckShortName | stickers.SuggestShortName | stickers.ChangeSticker | stickers.RenameStickerSet | stickers.DeleteStickerSet | stickers.ReplaceSticker
| 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
| folders.EditPeerFolders
- | stats.GetBroadcastStats | stats.LoadAsyncGraph | stats.GetMegagroupStats | stats.GetMessagePublicForwards | stats.GetMessageStats | stats.GetStoryStats | stats.GetStoryPublicForwards
+ | stats.GetBroadcastStats | stats.LoadAsyncGraph | stats.GetMegagroupStats | stats.GetMessagePublicForwards | stats.GetMessageStats | stats.GetStoryStats | stats.GetStoryPublicForwards | stats.GetBroadcastRevenueStats | stats.GetBroadcastRevenueWithdrawalUrl | stats.GetBroadcastRevenueTransactions
| chatlists.ExportChatlistInvite | chatlists.DeleteExportedInvite | chatlists.EditExportedInvite | chatlists.GetExportedInvites | chatlists.CheckChatlistInvite | chatlists.JoinChatlistInvite | chatlists.GetChatlistUpdates | chatlists.JoinChatlistUpdates | chatlists.HideChatlistUpdates | chatlists.GetLeaveChatlistSuggestions | chatlists.LeaveChatlist
| stories.CanSendStory | stories.SendStory | stories.EditStory | stories.DeleteStories | stories.TogglePinned | stories.GetAllStories | stories.GetPinnedStories | stories.GetStoriesArchive | stories.GetStoriesByID | stories.ToggleAllStoriesHidden | stories.ReadStories | stories.IncrementStoryViews | stories.GetStoryViewsList | stories.GetStoriesViews | stories.ExportStoryLink | stories.Report | stories.ActivateStealthMode | stories.SendReaction | stories.GetPeerStories | stories.GetAllReadPeerStories | stories.GetPeerMaxIDs | stories.GetChatsToSend | stories.TogglePeerStoriesHidden | stories.GetStoryReactionsList
| premium.GetBoostsList | premium.GetMyBoosts | premium.ApplyBoost | premium.GetBoostsStatus | premium.GetUserBoosts
- | smsjobs.IsEligibleToJoin | smsjobs.Join | smsjobs.Leave | smsjobs.UpdateSettings | smsjobs.GetStatus | smsjobs.GetSmsJob | smsjobs.FinishJob;
+ | smsjobs.IsEligibleToJoin | smsjobs.Join | smsjobs.Leave | smsjobs.UpdateSettings | smsjobs.GetStatus | smsjobs.GetSmsJob | smsjobs.FinishJob
+ | fragment.GetCollectibleInfo;
}
diff --git a/src/lib/gramjs/tl/apiTl.js b/src/lib/gramjs/tl/apiTl.js
index e54dee53c..3d29cd904 100644
--- a/src/lib/gramjs/tl/apiTl.js
+++ b/src/lib/gramjs/tl/apiTl.js
@@ -66,7 +66,7 @@ storage.fileMov#4b09ebbc = storage.FileType;
storage.fileMp4#b3cea0e4 = storage.FileType;
storage.fileWebp#1081464c = storage.FileType;
userEmpty#d3bc4b7a id:long = User;
-user#215c4438 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor = User;
+user#215c4438 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true bot_business:flags2.11?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor = User;
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;
userProfilePhoto#82d1f706 flags:# has_video:flags.0?true personal:flags.2?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = UserProfilePhoto;
userStatusEmpty#9d05049 = UserStatus;
@@ -81,7 +81,7 @@ chatForbidden#6592a1a7 id:long title:string = Chat;
channel#aadfc8f flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true join_to_send:flags.28?true join_request:flags.29?true forum:flags.30?true flags2:# stories_hidden:flags2.1?true stories_hidden_min:flags2.2?true stories_unavailable:flags2.3?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int usernames:flags2.0?Vector stories_max_id:flags2.4?int color:flags2.7?PeerColor profile_color:flags2.8?PeerColor emoji_status:flags2.9?EmojiStatus level:flags2.10?int = Chat;
channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
chatFull#c9d31138 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true translations_disabled:flags.19?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector available_reactions:flags.18?ChatReactions = ChatFull;
-channelFull#44c054a7 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet = ChatFull;
+channelFull#44c054a7 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet = ChatFull;
chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
chatParticipantAdmin#a0933f5b user_id:long inviter_id:long date:int = ChatParticipant;
@@ -90,7 +90,7 @@ chatParticipants#3cbc93f8 chat_id:long participants:Vector vers
chatPhotoEmpty#37c1011c = ChatPhoto;
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
-message#a66c7efc flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int = Message;
+message#2357bf25 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int = Message;
messageService#2b085862 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction ttl_period:flags.25?int = Message;
messageMediaEmpty#3ded6320 = MessageMedia;
messageMediaPhoto#695150d7 flags:# spoiler:flags.3?true photo:flags.0?Photo ttl_seconds:flags.2?int = MessageMedia;
@@ -150,6 +150,7 @@ messageActionGiftCode#678c2e09 flags:# via_giveaway:flags.0?true unclaimed:flags
messageActionGiveawayLaunch#332ba9ed = MessageAction;
messageActionGiveawayResults#2a9fadc5 winners_count:int unclaimed_count:int = MessageAction;
messageActionBoostApply#cc02aa6d boosts:int = MessageAction;
+messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector = MessageAction;
dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true view_forum_as_messages:flags.6?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 ttl_period:flags.5?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;
@@ -174,7 +175,7 @@ inputNotifyBroadcasts#b1db7c7e = InputNotifyPeer;
inputNotifyForumTopic#5c467992 peer:InputPeer top_msg_id:int = InputNotifyPeer;
inputPeerNotifySettings#cacb6ae2 flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?NotificationSound stories_muted:flags.6?Bool stories_hide_sender:flags.7?Bool stories_sound:flags.8?NotificationSound = InputPeerNotifySettings;
peerNotifySettings#99622c0c flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int ios_sound:flags.3?NotificationSound android_sound:flags.4?NotificationSound other_sound:flags.5?NotificationSound stories_muted:flags.6?Bool stories_hide_sender:flags.7?Bool stories_ios_sound:flags.8?NotificationSound stories_android_sound:flags.9?NotificationSound stories_other_sound:flags.10?NotificationSound = PeerNotifySettings;
-peerSettings#a518110d flags:# report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true invite_members:flags.8?true request_chat_broadcast:flags.10?true geo_distance:flags.6?int request_chat_title:flags.9?string request_chat_date:flags.9?int = PeerSettings;
+peerSettings#acd66c5e flags:# report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true invite_members:flags.8?true request_chat_broadcast:flags.10?true business_bot_paused:flags.11?true business_bot_can_reply:flags.12?true geo_distance:flags.6?int request_chat_title:flags.9?string request_chat_date:flags.9?int business_bot_id:flags.13?long business_bot_manage_url:flags.13?string = PeerSettings;
wallPaper#a437c3ed id:long flags:# creator:flags.0?true default:flags.1?true pattern:flags.3?true dark:flags.4?true access_hash:long slug:string document:Document settings:flags.2?WallPaperSettings = WallPaper;
wallPaperNoFile#e0804116 id:long flags:# default:flags.1?true dark:flags.4?true settings:flags.2?WallPaperSettings = WallPaper;
inputReportReasonSpam#58dbcab8 = ReportReason;
@@ -187,7 +188,7 @@ inputReportReasonGeoIrrelevant#dbd4feed = ReportReason;
inputReportReasonFake#f5ddd6e7 = ReportReason;
inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason;
-userFull#22ff3e85 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 translations_disabled:flags.23?true stories_pinned_available:flags.26?true blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:# id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?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 wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage = UserFull;
+userFull#cc997720 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 translations_disabled:flags.23?true stories_pinned_available:flags.26?true blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:# id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?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 wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int = 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;
@@ -335,7 +336,6 @@ updateChannelPinnedTopic#192efbe3 flags:# pinned:flags.0?true channel_id:long to
updateChannelPinnedTopics#fe198602 flags:# channel_id:long order:flags.0?Vector = Update;
updateUser#20529438 user_id:long = Update;
updateAutoSaveSettings#ec05b097 = Update;
-updateGroupInvitePrivacyForbidden#ccf08ad6 user_id:long = Update;
updateStory#75b3b798 peer:Peer story:StoryItem = Update;
updateReadStories#f74e932b peer:Peer max_id:int = Update;
updateStoryID#1bf335b9 id:int random_id:long = Update;
@@ -355,6 +355,10 @@ updateNewQuickReply#f53da717 quick_reply:QuickReply = Update;
updateDeleteQuickReply#53e6f1ec shortcut_id:int = Update;
updateQuickReplyMessage#3e050d0f message:Message = Update;
updateDeleteQuickReplyMessages#566fe7cd shortcut_id:int messages:Vector = Update;
+updateBotBusinessConnect#8ae5c97a connection:BotBusinessConnection qts:int = Update;
+updateBotNewBusinessMessage#9ddb347c flags:# connection_id:string message:Message reply_to_message:flags.0?Message qts:int = Update;
+updateBotEditBusinessMessage#7df587c flags:# connection_id:string message:Message reply_to_message:flags.0?Message qts:int = Update;
+updateBotDeleteBusinessMessage#a02a982e connection_id:string peer:Peer messages:Vector qts:int = 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 new_encrypted_messages:Vector other_updates:Vector chats:Vector users:Vector state:updates.State = updates.Difference;
@@ -435,6 +439,7 @@ inputPrivacyKeyPhoneNumber#352dafa = InputPrivacyKey;
inputPrivacyKeyAddedByPhone#d1219bdd = InputPrivacyKey;
inputPrivacyKeyVoiceMessages#aee69d68 = InputPrivacyKey;
inputPrivacyKeyAbout#3823cc40 = InputPrivacyKey;
+inputPrivacyKeyBirthday#d65a11cc = InputPrivacyKey;
privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
privacyKeyChatInvite#500e6dfa = PrivacyKey;
privacyKeyPhoneCall#3d662b7b = PrivacyKey;
@@ -445,6 +450,7 @@ privacyKeyPhoneNumber#d19ae46d = PrivacyKey;
privacyKeyAddedByPhone#42ffd42b = PrivacyKey;
privacyKeyVoiceMessages#697f414 = PrivacyKey;
privacyKeyAbout#a486b761 = PrivacyKey;
+privacyKeyBirthday#2000a518 = PrivacyKey;
inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;
inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;
inputPrivacyValueAllowUsers#131cc67f users:Vector = InputPrivacyRule;
@@ -454,6 +460,7 @@ inputPrivacyValueDisallowUsers#90110467 users:Vector = InputPrivacyRu
inputPrivacyValueAllowChatParticipants#840649cf chats:Vector = InputPrivacyRule;
inputPrivacyValueDisallowChatParticipants#e94f0f86 chats:Vector = InputPrivacyRule;
inputPrivacyValueAllowCloseFriends#2f453e49 = InputPrivacyRule;
+inputPrivacyValueAllowPremium#77cdc9f1 = InputPrivacyRule;
privacyValueAllowContacts#fffe1bac = PrivacyRule;
privacyValueAllowAll#65427b82 = PrivacyRule;
privacyValueAllowUsers#b8905fb2 users:Vector = PrivacyRule;
@@ -463,6 +470,7 @@ privacyValueDisallowUsers#e4621141 users:Vector = PrivacyRule;
privacyValueAllowChatParticipants#6b134e8e chats:Vector = PrivacyRule;
privacyValueDisallowChatParticipants#41c87565 chats:Vector = PrivacyRule;
privacyValueAllowCloseFriends#f7e8d89b = PrivacyRule;
+privacyValueAllowPremium#ece9814b = PrivacyRule;
account.privacyRules#50a04e45 rules:Vector chats:Vector users:Vector = account.PrivacyRules;
accountDaysTTL#b8d0afdf days:int = AccountDaysTTL;
documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute;
@@ -506,7 +514,7 @@ inputStickerSetEmojiGenericAnimations#4c4d4ce = InputStickerSet;
inputStickerSetEmojiDefaultStatuses#29d0f5ee = InputStickerSet;
inputStickerSetEmojiDefaultTopicIcons#44c1f8e9 = InputStickerSet;
inputStickerSetEmojiChannelDefaultStatuses#49748553 = 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 text_color:flags.9?true channel_emoji_status:flags.10?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector thumb_dc_id:flags.4?int thumb_version:flags.4?int thumb_document_id:flags.8?long count:int hash:int = StickerSet;
+stickerSet#2dd14edc flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true emojis:flags.7?true text_color:flags.9?true channel_emoji_status:flags.10?true creator:flags.11?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector thumb_dc_id:flags.4?int thumb_version:flags.4?int thumb_document_id:flags.8?long count:int hash:int = StickerSet;
messages.stickerSet#6e153f16 set:StickerSet packs:Vector keywords:Vector documents:Vector = messages.StickerSet;
messages.stickerSetNotModified#d3f924eb = messages.StickerSet;
botCommand#c27ac8c7 command:string description:string = BotCommand;
@@ -527,6 +535,7 @@ keyboardButtonUserProfile#308660c1 text:string user_id:long = KeyboardButton;
keyboardButtonWebView#13767230 text:string url:string = KeyboardButton;
keyboardButtonSimpleWebView#a0c0505c text:string url:string = KeyboardButton;
keyboardButtonRequestPeer#53d7bfd8 text:string button_id:int peer_type:RequestPeerType max_quantity:int = KeyboardButton;
+inputKeyboardButtonRequestPeer#c9662d05 flags:# name_requested:flags.0?true username_requested:flags.1?true photo_requested:flags.2?true text:string button_id:int peer_type:RequestPeerType max_quantity:int = KeyboardButton;
keyboardButtonRow#77608b83 buttons:Vector = KeyboardButtonRow;
replyKeyboardHide#a03e5b85 flags:# selective:flags.2?true = ReplyMarkup;
replyKeyboardForceReply#86b40b08 flags:# single_use:flags.1?true selective:flags.2?true placeholder:flags.3?string = ReplyMarkup;
@@ -742,7 +751,7 @@ phoneCallEmpty#5366c915 id:long = PhoneCall;
phoneCallWaiting#c5226f17 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long protocol:PhoneCallProtocol receive_date:flags.0?int = PhoneCall;
phoneCallRequested#14b0ed0c flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_hash:bytes protocol:PhoneCallProtocol = PhoneCall;
phoneCallAccepted#3660c311 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_b:bytes protocol:PhoneCallProtocol = PhoneCall;
-phoneCall#967f7c67 flags:# p2p_allowed:flags.5?true video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector start_date:int = PhoneCall;
+phoneCall#30535af5 flags:# p2p_allowed:flags.5?true video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector start_date:int custom_parameters:flags.7?DataJSON = PhoneCall;
phoneCallDiscarded#50ca4de1 flags:# need_rating:flags.2?true need_debug:flags.3?true video:flags.6?true id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = PhoneCall;
phoneConnection#9cc123c7 flags:# tcp:flags.0?true id:long ip:string ipv6:string port:int peer_tag:bytes = PhoneConnection;
phoneConnectionWebrtc#635fe375 flags:# turn:flags.0?true stun:flags.1?true id:long ip:string ipv6:string port:int username:string password:string = PhoneConnection;
@@ -1032,7 +1041,7 @@ botCommandScopePeerUser#a1321f3 peer:InputPeer user_id:InputUser = BotCommandSco
account.resetPasswordFailedWait#e3779861 retry_date:int = account.ResetPasswordResult;
account.resetPasswordRequestedWait#e9effc7d until_date:int = account.ResetPasswordResult;
account.resetPasswordOk#e926d63e = account.ResetPasswordResult;
-sponsoredMessage#ed5383f7 flags:# recommended:flags.5?true show_peer_photo:flags.6?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string webpage:flags.9?SponsoredWebPage app:flags.10?BotApp message:string entities:flags.1?Vector button_text:flags.11?string sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage;
+sponsoredMessage#ed5383f7 flags:# recommended:flags.5?true show_peer_photo:flags.6?true can_report:flags.12?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string webpage:flags.9?SponsoredWebPage app:flags.10?BotApp message:string entities:flags.1?Vector button_text:flags.11?string sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage;
messages.sponsoredMessages#c9ee1d87 flags:# posts_between:flags.0?int messages:Vector chats:Vector users:Vector = messages.SponsoredMessages;
messages.sponsoredMessagesEmpty#1839490f = messages.SponsoredMessages;
searchResultsCalendarPeriod#c9b0539f date:int min_msg_id:int max_msg_id:int count:int = SearchResultsCalendarPeriod;
@@ -1241,9 +1250,40 @@ inputQuickReplyShortcut#24596d41 shortcut:string = InputQuickReplyShortcut;
inputQuickReplyShortcutId#1190cf1 shortcut_id:int = InputQuickReplyShortcut;
messages.quickReplies#c68d6695 quick_replies:Vector messages:Vector chats:Vector users:Vector = messages.QuickReplies;
messages.quickRepliesNotModified#5f91eb5b = messages.QuickReplies;
-connectedBot#e7e999e7 flags:# can_reply:flags.0?true bot_id:long recipients:BusinessRecipients = ConnectedBot;
+connectedBot#bd068601 flags:# can_reply:flags.0?true bot_id:long recipients:BusinessBotRecipients = ConnectedBot;
account.connectedBots#17d7f87b connected_bots:Vector users:Vector = account.ConnectedBots;
messages.dialogFilters#2ad93719 flags:# tags_enabled:flags.0?true filters:Vector = messages.DialogFilters;
+birthday#6c8e1e06 flags:# day:int month:int year:flags.0?int = Birthday;
+botBusinessConnection#896433b4 flags:# can_reply:flags.0?true disabled:flags.1?true connection_id:string user_id:long dc_id:int date:int = BotBusinessConnection;
+inputBusinessIntro#9c469cd flags:# title:string description:string sticker:flags.0?InputDocument = InputBusinessIntro;
+businessIntro#5a0a066d flags:# title:string description:string sticker:flags.0?Document = BusinessIntro;
+messages.myStickers#faff629d count:int sets:Vector = messages.MyStickers;
+inputCollectibleUsername#e39460a9 username:string = InputCollectible;
+inputCollectiblePhone#a2e214a4 phone:string = InputCollectible;
+fragment.collectibleInfo#6ebdff91 purchase_date:int currency:string amount:long crypto_currency:string crypto_amount:long url:string = fragment.CollectibleInfo;
+inputBusinessBotRecipients#c4e5921e flags:# existing_chats:flags.0?true new_chats:flags.1?true contacts:flags.2?true non_contacts:flags.3?true exclude_selected:flags.5?true users:flags.4?Vector exclude_users:flags.6?Vector = InputBusinessBotRecipients;
+businessBotRecipients#b88cf373 flags:# existing_chats:flags.0?true new_chats:flags.1?true contacts:flags.2?true non_contacts:flags.3?true exclude_selected:flags.5?true users:flags.4?Vector exclude_users:flags.6?Vector = BusinessBotRecipients;
+contactBirthday#1d998733 contact_id:long birthday:Birthday = ContactBirthday;
+contacts.contactBirthdays#114ff30d contacts:Vector users:Vector = contacts.ContactBirthdays;
+missingInvitee#628c9224 flags:# premium_would_allow_invite:flags.0?true premium_required_for_pm:flags.1?true user_id:long = MissingInvitee;
+messages.invitedUsers#7f5defa6 updates:Updates missing_invitees:Vector = messages.InvitedUsers;
+inputBusinessChatLink#11679fa7 flags:# message:string entities:flags.0?Vector title:flags.1?string = InputBusinessChatLink;
+businessChatLink#b4ae666f flags:# link:string message:string entities:flags.0?Vector title:flags.1?string views:int = BusinessChatLink;
+account.businessChatLinks#ec43a2d1 links:Vector chats:Vector users:Vector = account.BusinessChatLinks;
+account.resolvedBusinessChatLinks#9a23af21 flags:# peer:Peer message:string entities:flags.0?Vector chats:Vector users:Vector = account.ResolvedBusinessChatLinks;
+requestedPeerUser#d62ff46a flags:# user_id:long first_name:flags.0?string last_name:flags.0?string username:flags.1?string photo:flags.2?Photo = RequestedPeer;
+requestedPeerChat#7307544f flags:# chat_id:long title:flags.0?string photo:flags.2?Photo = RequestedPeer;
+requestedPeerChannel#8ba403e4 flags:# channel_id:long title:flags.0?string username:flags.1?string photo:flags.2?Photo = RequestedPeer;
+sponsoredMessageReportOption#430d3150 text:string option:bytes = SponsoredMessageReportOption;
+channels.sponsoredMessageReportResultChooseOption#846f9e42 title:string options:Vector = channels.SponsoredMessageReportResult;
+channels.sponsoredMessageReportResultAdsHidden#3e3bcf2f = channels.SponsoredMessageReportResult;
+channels.sponsoredMessageReportResultReported#ad798849 = channels.SponsoredMessageReportResult;
+stats.broadcastRevenueStats#d07b4bad top_hours_graph:StatsGraph revenue_graph:StatsGraph current_balance:long available_balance:long overall_revenue:long usd_rate:double = stats.BroadcastRevenueStats;
+stats.broadcastRevenueWithdrawalUrl#ec659737 url:string = stats.BroadcastRevenueWithdrawalUrl;
+broadcastRevenueTransactionProceeds#557e2cc4 amount:long from_date:int to_date:int = BroadcastRevenueTransaction;
+broadcastRevenueTransactionWithdrawal#5a590978 flags:# pending:flags.0?true failed:flags.2?true amount:long date:int provider:string transaction_date:flags.1?int transaction_url:flags.1?string = BroadcastRevenueTransaction;
+broadcastRevenueTransactionRefund#42d30d2e amount:long date:int provider:string = BroadcastRevenueTransaction;
+stats.broadcastRevenueTransactions#87158466 count:int transactions:Vector = stats.BroadcastRevenueTransactions;
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
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;
@@ -1337,9 +1377,9 @@ messages.getChats#49e9528f id:Vector = messages.Chats;
messages.getFullChat#aeb00b34 chat_id:long = messages.ChatFull;
messages.editChatTitle#73783ffd chat_id:long title:string = Updates;
messages.editChatPhoto#35ddd674 chat_id:long photo:InputChatPhoto = Updates;
-messages.addChatUser#f24753e3 chat_id:long user_id:InputUser fwd_limit:int = Updates;
+messages.addChatUser#cbc6d107 chat_id:long user_id:InputUser fwd_limit:int = messages.InvitedUsers;
messages.deleteChatUser#a2185cab flags:# revoke_history:flags.0?true chat_id:long user_id:InputUser = Updates;
-messages.createChat#34a818 flags:# users:Vector title:string ttl_period:flags.0?int = Updates;
+messages.createChat#92ceddd4 flags:# users:Vector title:string ttl_period:flags.0?int = messages.InvitedUsers;
messages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig;
messages.readMessageContents#36a73f77 id:Vector = messages.AffectedMessages;
messages.getStickers#d5a5d3a1 emoticon:string hash:long = messages.Stickers;
@@ -1373,7 +1413,7 @@ messages.getCommonChats#e40ca104 user_id:InputUser max_id:long limit:int = messa
messages.getWebPage#8d9692a3 url:string hash:int = messages.WebPage;
messages.toggleDialogPin#a731e257 flags:# pinned:flags.0?true peer:InputDialogPeer = Bool;
messages.getPinnedDialogs#d6b94df2 folder_id:int = messages.PeerDialogs;
-messages.uploadMedia#519bc2b1 peer:InputPeer media:InputMedia = MessageMedia;
+messages.uploadMedia#14967978 flags:# business_connection_id:flags.0?string peer:InputPeer media:InputMedia = MessageMedia;
messages.getFavedStickers#4f1aaa9 hash:long = messages.FavedStickers;
messages.faveSticker#b9ffc55b id:InputDocument unfave:Bool = Bool;
messages.getUnreadMentions#f107e790 flags:# peer:InputPeer top_msg_id:flags.0?int offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
@@ -1451,7 +1491,8 @@ messages.updateSavedReactionTag#60297dec flags:# reaction:Reaction title:flags.0
messages.getDefaultTagReactions#bdf93428 hash:long = messages.Reactions;
messages.getOutboxReadDate#8c4bfe5d peer:InputPeer msg_id:int = OutboxReadDate;
messages.getQuickReplies#d483f2a8 hash:long = messages.QuickReplies;
-messages.sendQuickReplyMessages#33153ad4 peer:InputPeer shortcut_id:int = Updates;
+messages.getQuickReplyMessages#94a495c3 flags:# shortcut_id:int id:flags.0?Vector hash:long = messages.Messages;
+messages.sendQuickReplyMessages#6c750de1 peer:InputPeer shortcut_id:int id:Vector random_id:Vector = Updates;
updates.getState#edd4882a = updates.State;
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
updates.getChannelDifference#3173d78 flags:# force:flags.0?true channel:InputChannel filter:ChannelMessagesFilter pts:int limit:int = updates.ChannelDifference;
@@ -1488,7 +1529,7 @@ channels.checkUsername#10e6bd2c channel:InputChannel username:string = Bool;
channels.updateUsername#3514b3de channel:InputChannel username:string = Bool;
channels.joinChannel#24b524c5 channel:InputChannel = Updates;
channels.leaveChannel#f836aa95 channel:InputChannel = Updates;
-channels.inviteToChannel#199f3a6c channel:InputChannel users:Vector = Updates;
+channels.inviteToChannel#c9e33d54 channel:InputChannel users:Vector = messages.InvitedUsers;
channels.deleteChannel#c0111fe3 channel:InputChannel = Updates;
channels.exportMessageLink#e63fadeb flags:# grouped:flags.0?true thread:flags.1?true channel:InputChannel id:int = ExportedMessageLink;
channels.toggleSignatures#1f69b606 channel:InputChannel enabled:Bool = Updates;
diff --git a/src/lib/gramjs/tl/static/api.json b/src/lib/gramjs/tl/static/api.json
index 3283f6f85..2e7fa6dcf 100644
--- a/src/lib/gramjs/tl/static/api.json
+++ b/src/lib/gramjs/tl/static/api.json
@@ -170,6 +170,7 @@
"messages.togglePeerTranslations",
"messages.getOutboxReadDate",
"messages.getQuickReplies",
+ "messages.getQuickReplyMessages",
"messages.sendQuickReplyMessages",
"updates.getState",
"updates.getDifference",
diff --git a/src/lib/gramjs/tl/static/api.tl b/src/lib/gramjs/tl/static/api.tl
index ae73da15c..e319e0e22 100644
--- a/src/lib/gramjs/tl/static/api.tl
+++ b/src/lib/gramjs/tl/static/api.tl
@@ -82,7 +82,7 @@ storage.fileMp4#b3cea0e4 = storage.FileType;
storage.fileWebp#1081464c = storage.FileType;
userEmpty#d3bc4b7a id:long = User;
-user#215c4438 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor = User;
+user#215c4438 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true bot_business:flags2.11?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor = User;
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;
userProfilePhoto#82d1f706 flags:# has_video:flags.0?true personal:flags.2?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = UserProfilePhoto;
@@ -101,7 +101,7 @@ channel#aadfc8f flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5
channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
chatFull#c9d31138 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true translations_disabled:flags.19?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector available_reactions:flags.18?ChatReactions = ChatFull;
-channelFull#44c054a7 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet = ChatFull;
+channelFull#44c054a7 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet = ChatFull;
chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
@@ -114,7 +114,7 @@ chatPhotoEmpty#37c1011c = ChatPhoto;
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
-message#a66c7efc flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int = Message;
+message#2357bf25 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int = Message;
messageService#2b085862 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction ttl_period:flags.25?int = Message;
messageMediaEmpty#3ded6320 = MessageMedia;
@@ -176,6 +176,7 @@ messageActionGiftCode#678c2e09 flags:# via_giveaway:flags.0?true unclaimed:flags
messageActionGiveawayLaunch#332ba9ed = MessageAction;
messageActionGiveawayResults#2a9fadc5 winners_count:int unclaimed_count:int = MessageAction;
messageActionBoostApply#cc02aa6d boosts:int = MessageAction;
+messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector = MessageAction;
dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true view_forum_as_messages:flags.6?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 ttl_period:flags.5?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;
@@ -211,7 +212,7 @@ inputPeerNotifySettings#cacb6ae2 flags:# show_previews:flags.0?Bool silent:flags
peerNotifySettings#99622c0c flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int ios_sound:flags.3?NotificationSound android_sound:flags.4?NotificationSound other_sound:flags.5?NotificationSound stories_muted:flags.6?Bool stories_hide_sender:flags.7?Bool stories_ios_sound:flags.8?NotificationSound stories_android_sound:flags.9?NotificationSound stories_other_sound:flags.10?NotificationSound = PeerNotifySettings;
-peerSettings#a518110d flags:# report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true invite_members:flags.8?true request_chat_broadcast:flags.10?true geo_distance:flags.6?int request_chat_title:flags.9?string request_chat_date:flags.9?int = PeerSettings;
+peerSettings#acd66c5e flags:# report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true invite_members:flags.8?true request_chat_broadcast:flags.10?true business_bot_paused:flags.11?true business_bot_can_reply:flags.12?true geo_distance:flags.6?int request_chat_title:flags.9?string request_chat_date:flags.9?int business_bot_id:flags.13?long business_bot_manage_url:flags.13?string = PeerSettings;
wallPaper#a437c3ed id:long flags:# creator:flags.0?true default:flags.1?true pattern:flags.3?true dark:flags.4?true access_hash:long slug:string document:Document settings:flags.2?WallPaperSettings = WallPaper;
wallPaperNoFile#e0804116 id:long flags:# default:flags.1?true dark:flags.4?true settings:flags.2?WallPaperSettings = WallPaper;
@@ -227,7 +228,7 @@ inputReportReasonFake#f5ddd6e7 = ReportReason;
inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason;
-userFull#22ff3e85 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 translations_disabled:flags.23?true stories_pinned_available:flags.26?true blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:# id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?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 wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage = UserFull;
+userFull#cc997720 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 translations_disabled:flags.23?true stories_pinned_available:flags.26?true blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:# id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?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 wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact;
@@ -388,7 +389,6 @@ updateChannelPinnedTopic#192efbe3 flags:# pinned:flags.0?true channel_id:long to
updateChannelPinnedTopics#fe198602 flags:# channel_id:long order:flags.0?Vector = Update;
updateUser#20529438 user_id:long = Update;
updateAutoSaveSettings#ec05b097 = Update;
-updateGroupInvitePrivacyForbidden#ccf08ad6 user_id:long = Update;
updateStory#75b3b798 peer:Peer story:StoryItem = Update;
updateReadStories#f74e932b peer:Peer max_id:int = Update;
updateStoryID#1bf335b9 id:int random_id:long = Update;
@@ -408,6 +408,10 @@ updateNewQuickReply#f53da717 quick_reply:QuickReply = Update;
updateDeleteQuickReply#53e6f1ec shortcut_id:int = Update;
updateQuickReplyMessage#3e050d0f message:Message = Update;
updateDeleteQuickReplyMessages#566fe7cd shortcut_id:int messages:Vector = Update;
+updateBotBusinessConnect#8ae5c97a connection:BotBusinessConnection qts:int = Update;
+updateBotNewBusinessMessage#9ddb347c flags:# connection_id:string message:Message reply_to_message:flags.0?Message qts:int = Update;
+updateBotEditBusinessMessage#7df587c flags:# connection_id:string message:Message reply_to_message:flags.0?Message qts:int = Update;
+updateBotDeleteBusinessMessage#a02a982e connection_id:string peer:Peer messages:Vector qts:int = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
@@ -513,6 +517,7 @@ inputPrivacyKeyPhoneNumber#352dafa = InputPrivacyKey;
inputPrivacyKeyAddedByPhone#d1219bdd = InputPrivacyKey;
inputPrivacyKeyVoiceMessages#aee69d68 = InputPrivacyKey;
inputPrivacyKeyAbout#3823cc40 = InputPrivacyKey;
+inputPrivacyKeyBirthday#d65a11cc = InputPrivacyKey;
privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
privacyKeyChatInvite#500e6dfa = PrivacyKey;
@@ -524,6 +529,7 @@ privacyKeyPhoneNumber#d19ae46d = PrivacyKey;
privacyKeyAddedByPhone#42ffd42b = PrivacyKey;
privacyKeyVoiceMessages#697f414 = PrivacyKey;
privacyKeyAbout#a486b761 = PrivacyKey;
+privacyKeyBirthday#2000a518 = PrivacyKey;
inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;
inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;
@@ -534,6 +540,7 @@ inputPrivacyValueDisallowUsers#90110467 users:Vector = InputPrivacyRu
inputPrivacyValueAllowChatParticipants#840649cf chats:Vector = InputPrivacyRule;
inputPrivacyValueDisallowChatParticipants#e94f0f86 chats:Vector = InputPrivacyRule;
inputPrivacyValueAllowCloseFriends#2f453e49 = InputPrivacyRule;
+inputPrivacyValueAllowPremium#77cdc9f1 = InputPrivacyRule;
privacyValueAllowContacts#fffe1bac = PrivacyRule;
privacyValueAllowAll#65427b82 = PrivacyRule;
@@ -544,6 +551,7 @@ privacyValueDisallowUsers#e4621141 users:Vector = PrivacyRule;
privacyValueAllowChatParticipants#6b134e8e chats:Vector = PrivacyRule;
privacyValueDisallowChatParticipants#41c87565 chats:Vector = PrivacyRule;
privacyValueAllowCloseFriends#f7e8d89b = PrivacyRule;
+privacyValueAllowPremium#ece9814b = PrivacyRule;
account.privacyRules#50a04e45 rules:Vector chats:Vector users:Vector = account.PrivacyRules;
@@ -606,7 +614,7 @@ inputStickerSetEmojiDefaultStatuses#29d0f5ee = InputStickerSet;
inputStickerSetEmojiDefaultTopicIcons#44c1f8e9 = InputStickerSet;
inputStickerSetEmojiChannelDefaultStatuses#49748553 = 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 text_color:flags.9?true channel_emoji_status:flags.10?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector thumb_dc_id:flags.4?int thumb_version:flags.4?int thumb_document_id:flags.8?long count:int hash:int = StickerSet;
+stickerSet#2dd14edc flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true emojis:flags.7?true text_color:flags.9?true channel_emoji_status:flags.10?true creator:flags.11?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector thumb_dc_id:flags.4?int thumb_version:flags.4?int thumb_document_id:flags.8?long count:int hash:int = StickerSet;
messages.stickerSet#6e153f16 set:StickerSet packs:Vector keywords:Vector documents:Vector = messages.StickerSet;
messages.stickerSetNotModified#d3f924eb = messages.StickerSet;
@@ -631,6 +639,7 @@ keyboardButtonUserProfile#308660c1 text:string user_id:long = KeyboardButton;
keyboardButtonWebView#13767230 text:string url:string = KeyboardButton;
keyboardButtonSimpleWebView#a0c0505c text:string url:string = KeyboardButton;
keyboardButtonRequestPeer#53d7bfd8 text:string button_id:int peer_type:RequestPeerType max_quantity:int = KeyboardButton;
+inputKeyboardButtonRequestPeer#c9662d05 flags:# name_requested:flags.0?true username_requested:flags.1?true photo_requested:flags.2?true text:string button_id:int peer_type:RequestPeerType max_quantity:int = KeyboardButton;
keyboardButtonRow#77608b83 buttons:Vector = KeyboardButtonRow;
@@ -915,7 +924,7 @@ phoneCallEmpty#5366c915 id:long = PhoneCall;
phoneCallWaiting#c5226f17 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long protocol:PhoneCallProtocol receive_date:flags.0?int = PhoneCall;
phoneCallRequested#14b0ed0c flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_hash:bytes protocol:PhoneCallProtocol = PhoneCall;
phoneCallAccepted#3660c311 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_b:bytes protocol:PhoneCallProtocol = PhoneCall;
-phoneCall#967f7c67 flags:# p2p_allowed:flags.5?true video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector start_date:int = PhoneCall;
+phoneCall#30535af5 flags:# p2p_allowed:flags.5?true video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector start_date:int custom_parameters:flags.7?DataJSON = PhoneCall;
phoneCallDiscarded#50ca4de1 flags:# need_rating:flags.2?true need_debug:flags.3?true video:flags.6?true id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = PhoneCall;
phoneConnection#9cc123c7 flags:# tcp:flags.0?true id:long ip:string ipv6:string port:int peer_tag:bytes = PhoneConnection;
@@ -1352,7 +1361,7 @@ account.resetPasswordFailedWait#e3779861 retry_date:int = account.ResetPasswordR
account.resetPasswordRequestedWait#e9effc7d until_date:int = account.ResetPasswordResult;
account.resetPasswordOk#e926d63e = account.ResetPasswordResult;
-sponsoredMessage#ed5383f7 flags:# recommended:flags.5?true show_peer_photo:flags.6?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string webpage:flags.9?SponsoredWebPage app:flags.10?BotApp message:string entities:flags.1?Vector button_text:flags.11?string sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage;
+sponsoredMessage#ed5383f7 flags:# recommended:flags.5?true show_peer_photo:flags.6?true can_report:flags.12?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string webpage:flags.9?SponsoredWebPage app:flags.10?BotApp message:string entities:flags.1?Vector button_text:flags.11?string sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage;
messages.sponsoredMessages#c9ee1d87 flags:# posts_between:flags.0?int messages:Vector chats:Vector users:Vector = messages.SponsoredMessages;
messages.sponsoredMessagesEmpty#1839490f = messages.SponsoredMessages;
@@ -1700,12 +1709,67 @@ inputQuickReplyShortcutId#1190cf1 shortcut_id:int = InputQuickReplyShortcut;
messages.quickReplies#c68d6695 quick_replies:Vector messages:Vector chats:Vector users:Vector = messages.QuickReplies;
messages.quickRepliesNotModified#5f91eb5b = messages.QuickReplies;
-connectedBot#e7e999e7 flags:# can_reply:flags.0?true bot_id:long recipients:BusinessRecipients = ConnectedBot;
+connectedBot#bd068601 flags:# can_reply:flags.0?true bot_id:long recipients:BusinessBotRecipients = ConnectedBot;
account.connectedBots#17d7f87b connected_bots:Vector users:Vector = account.ConnectedBots;
messages.dialogFilters#2ad93719 flags:# tags_enabled:flags.0?true filters:Vector = messages.DialogFilters;
+birthday#6c8e1e06 flags:# day:int month:int year:flags.0?int = Birthday;
+
+botBusinessConnection#896433b4 flags:# can_reply:flags.0?true disabled:flags.1?true connection_id:string user_id:long dc_id:int date:int = BotBusinessConnection;
+
+inputBusinessIntro#9c469cd flags:# title:string description:string sticker:flags.0?InputDocument = InputBusinessIntro;
+
+businessIntro#5a0a066d flags:# title:string description:string sticker:flags.0?Document = BusinessIntro;
+
+messages.myStickers#faff629d count:int sets:Vector = messages.MyStickers;
+
+inputCollectibleUsername#e39460a9 username:string = InputCollectible;
+inputCollectiblePhone#a2e214a4 phone:string = InputCollectible;
+
+fragment.collectibleInfo#6ebdff91 purchase_date:int currency:string amount:long crypto_currency:string crypto_amount:long url:string = fragment.CollectibleInfo;
+
+inputBusinessBotRecipients#c4e5921e flags:# existing_chats:flags.0?true new_chats:flags.1?true contacts:flags.2?true non_contacts:flags.3?true exclude_selected:flags.5?true users:flags.4?Vector exclude_users:flags.6?Vector = InputBusinessBotRecipients;
+
+businessBotRecipients#b88cf373 flags:# existing_chats:flags.0?true new_chats:flags.1?true contacts:flags.2?true non_contacts:flags.3?true exclude_selected:flags.5?true users:flags.4?Vector exclude_users:flags.6?Vector = BusinessBotRecipients;
+
+contactBirthday#1d998733 contact_id:long birthday:Birthday = ContactBirthday;
+
+contacts.contactBirthdays#114ff30d contacts:Vector users:Vector = contacts.ContactBirthdays;
+
+missingInvitee#628c9224 flags:# premium_would_allow_invite:flags.0?true premium_required_for_pm:flags.1?true user_id:long = MissingInvitee;
+
+messages.invitedUsers#7f5defa6 updates:Updates missing_invitees:Vector = messages.InvitedUsers;
+
+inputBusinessChatLink#11679fa7 flags:# message:string entities:flags.0?Vector title:flags.1?string = InputBusinessChatLink;
+
+businessChatLink#b4ae666f flags:# link:string message:string entities:flags.0?Vector title:flags.1?string views:int = BusinessChatLink;
+
+account.businessChatLinks#ec43a2d1 links:Vector chats:Vector users:Vector = account.BusinessChatLinks;
+
+account.resolvedBusinessChatLinks#9a23af21 flags:# peer:Peer message:string entities:flags.0?Vector chats:Vector users:Vector = account.ResolvedBusinessChatLinks;
+
+requestedPeerUser#d62ff46a flags:# user_id:long first_name:flags.0?string last_name:flags.0?string username:flags.1?string photo:flags.2?Photo = RequestedPeer;
+requestedPeerChat#7307544f flags:# chat_id:long title:flags.0?string photo:flags.2?Photo = RequestedPeer;
+requestedPeerChannel#8ba403e4 flags:# channel_id:long title:flags.0?string username:flags.1?string photo:flags.2?Photo = RequestedPeer;
+
+sponsoredMessageReportOption#430d3150 text:string option:bytes = SponsoredMessageReportOption;
+
+channels.sponsoredMessageReportResultChooseOption#846f9e42 title:string options:Vector = channels.SponsoredMessageReportResult;
+channels.sponsoredMessageReportResultAdsHidden#3e3bcf2f = channels.SponsoredMessageReportResult;
+channels.sponsoredMessageReportResultReported#ad798849 = channels.SponsoredMessageReportResult;
+
+stats.broadcastRevenueStats#d07b4bad top_hours_graph:StatsGraph revenue_graph:StatsGraph current_balance:long available_balance:long overall_revenue:long usd_rate:double = stats.BroadcastRevenueStats;
+
+stats.broadcastRevenueWithdrawalUrl#ec659737 url:string = stats.BroadcastRevenueWithdrawalUrl;
+
+broadcastRevenueTransactionProceeds#557e2cc4 amount:long from_date:int to_date:int = BroadcastRevenueTransaction;
+broadcastRevenueTransactionWithdrawal#5a590978 flags:# pending:flags.0?true failed:flags.2?true amount:long date:int provider:string transaction_date:flags.1?int transaction_url:flags.1?string = BroadcastRevenueTransaction;
+broadcastRevenueTransactionRefund#42d30d2e amount:long date:int provider:string = BroadcastRevenueTransaction;
+
+stats.broadcastRevenueTransactions#87158466 count:int transactions:Vector = stats.BroadcastRevenueTransactions;
+
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@@ -1715,6 +1779,7 @@ invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;
invokeWithoutUpdates#bf9459b7 {X:Type} query:!X = X;
invokeWithMessagesRange#365275f2 {X:Type} range:MessageRange query:!X = X;
invokeWithTakeout#aca9fd2e {X:Type} takeout_id:long query:!X = X;
+invokeWithBusinessConnection#dd289f8e {X:Type} connection_id:string query:!X = X;
auth.sendCode#a677244f phone_number:string api_id:int api_hash:string settings:CodeSettings = auth.SentCode;
auth.signUp#aac7b717 flags:# no_joined_notifications:flags.0?true phone_number:string phone_code_hash:string first_name:string last_name:string = auth.Authorization;
@@ -1835,8 +1900,19 @@ account.updateBusinessWorkHours#4b00e066 flags:# business_work_hours:flags.0?Bus
account.updateBusinessLocation#9e6b131a flags:# geo_point:flags.1?InputGeoPoint address:flags.0?string = Bool;
account.updateBusinessGreetingMessage#66cdafc4 flags:# message:flags.0?InputBusinessGreetingMessage = Bool;
account.updateBusinessAwayMessage#a26a7fa5 flags:# message:flags.0?InputBusinessAwayMessage = Bool;
-account.updateConnectedBot#9c2d527d flags:# can_reply:flags.0?true deleted:flags.1?true bot:InputUser recipients:InputBusinessRecipients = Updates;
+account.updateConnectedBot#43d8521d flags:# can_reply:flags.0?true deleted:flags.1?true bot:InputUser recipients:InputBusinessBotRecipients = Updates;
account.getConnectedBots#4ea4c80f = account.ConnectedBots;
+account.getBotBusinessConnection#76a86270 connection_id:string = Updates;
+account.updateBusinessIntro#a614d034 flags:# intro:flags.0?InputBusinessIntro = Bool;
+account.toggleConnectedBotPaused#646e1097 peer:InputPeer paused:Bool = Bool;
+account.disablePeerConnectedBot#5e437ed9 peer:InputPeer = Bool;
+account.updateBirthday#cc6e0c11 flags:# birthday:flags.0?Birthday = Bool;
+account.createBusinessChatLink#8851e68e link:InputBusinessChatLink = BusinessChatLink;
+account.editBusinessChatLink#8c3410af slug:string link:InputBusinessChatLink = BusinessChatLink;
+account.deleteBusinessChatLink#60073674 slug:string = Bool;
+account.getBusinessChatLinks#6f70dde1 = account.BusinessChatLinks;
+account.resolveBusinessChatLink#5492e5ee slug:string = account.ResolvedBusinessChatLinks;
+account.updatePersonalChannel#d94305e0 channel:InputChannel = Bool;
users.getUsers#d91a548 id:Vector = Vector;
users.getFullUser#b60f5918 id:InputUser = users.UserFull;
@@ -1868,6 +1944,7 @@ contacts.exportContactToken#f8654027 = ExportedContactToken;
contacts.importContactToken#13005788 token:string = User;
contacts.editCloseFriends#ba6705f0 id:Vector = Bool;
contacts.setBlocked#94c65c76 flags:# my_stories_from:flags.0?true id:Vector limit:int = Bool;
+contacts.getBirthdays#daeda864 = contacts.ContactBirthdays;
messages.getMessages#63c66506 id:Vector = messages.Messages;
messages.getDialogs#a0f4cb4f flags:# exclude_pinned:flags.0?true folder_id:flags.1?int offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:long = messages.Dialogs;
@@ -1888,9 +1965,9 @@ messages.getChats#49e9528f id:Vector = messages.Chats;
messages.getFullChat#aeb00b34 chat_id:long = messages.ChatFull;
messages.editChatTitle#73783ffd chat_id:long title:string = Updates;
messages.editChatPhoto#35ddd674 chat_id:long photo:InputChatPhoto = Updates;
-messages.addChatUser#f24753e3 chat_id:long user_id:InputUser fwd_limit:int = Updates;
+messages.addChatUser#cbc6d107 chat_id:long user_id:InputUser fwd_limit:int = messages.InvitedUsers;
messages.deleteChatUser#a2185cab flags:# revoke_history:flags.0?true chat_id:long user_id:InputUser = Updates;
-messages.createChat#34a818 flags:# users:Vector title:string ttl_period:flags.0?int = Updates;
+messages.createChat#92ceddd4 flags:# users:Vector title:string ttl_period:flags.0?int = messages.InvitedUsers;
messages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig;
messages.requestEncryption#f64daf43 user_id:InputUser random_id:int g_a:bytes = EncryptedChat;
messages.acceptEncryption#3dbc0415 peer:InputEncryptedChat g_b:bytes key_fingerprint:long = EncryptedChat;
@@ -1951,7 +2028,7 @@ messages.reorderPinnedDialogs#3b1adf37 flags:# force:flags.0?true folder_id:int
messages.getPinnedDialogs#d6b94df2 folder_id:int = messages.PeerDialogs;
messages.setBotShippingResults#e5f672fa flags:# query_id:long error:flags.0?string shipping_options:flags.1?Vector = Bool;
messages.setBotPrecheckoutResults#9c2dd95 flags:# success:flags.1?true query_id:long error:flags.0?string = Bool;
-messages.uploadMedia#519bc2b1 peer:InputPeer media:InputMedia = MessageMedia;
+messages.uploadMedia#14967978 flags:# business_connection_id:flags.0?string peer:InputPeer media:InputMedia = MessageMedia;
messages.sendScreenshotNotification#a1405817 peer:InputPeer reply_to:InputReplyTo random_id:long = Updates;
messages.getFavedStickers#4f1aaa9 hash:long = messages.FavedStickers;
messages.faveSticker#b9ffc55b id:InputDocument unfave:Bool = Bool;
@@ -2073,9 +2150,10 @@ messages.checkQuickReplyShortcut#f1d0fbd3 shortcut:string = Bool;
messages.editQuickReplyShortcut#5c003cef shortcut_id:int shortcut:string = Bool;
messages.deleteQuickReplyShortcut#3cc04740 shortcut_id:int = Bool;
messages.getQuickReplyMessages#94a495c3 flags:# shortcut_id:int id:flags.0?Vector hash:long = messages.Messages;
-messages.sendQuickReplyMessages#33153ad4 peer:InputPeer shortcut_id:int = Updates;
+messages.sendQuickReplyMessages#6c750de1 peer:InputPeer shortcut_id:int id:Vector