Support layer 189 (#5022)

Co-authored-by: zubiden <19638254+zubiden@users.noreply.github.com>
This commit is contained in:
Alexander Zinchuk 2024-11-02 21:10:42 +04:00
parent 85df404eaf
commit e96ff349c3
35 changed files with 395 additions and 106 deletions

View File

@ -828,6 +828,14 @@ function buildReplyButtons(message: UniversalMessage, shouldSkipBuyButton?: bool
};
}
if (button instanceof GramJs.KeyboardButtonCopy) {
return {
type: 'copy',
text,
copyText: button.copyText,
};
}
return {
type: 'unsupported',
text,

View File

@ -136,7 +136,11 @@ export function buildApiReceipt(receipt: GramJs.payments.TypePaymentReceipt): Ap
};
}
export function buildApiPaymentForm(form: GramJs.payments.TypePaymentForm): ApiPaymentForm {
export function buildApiPaymentForm(form: GramJs.payments.TypePaymentForm): ApiPaymentForm | undefined {
if (form instanceof GramJs.payments.PaymentFormStarGift) {
return undefined;
}
if (form instanceof GramJs.payments.PaymentFormStars) {
const { botId, formId } = form;
@ -220,7 +224,11 @@ export function buildApiPaymentForm(form: GramJs.payments.TypePaymentForm): ApiP
};
}
export function buildApiInvoiceFromForm(form: GramJs.payments.TypePaymentForm): ApiInvoice {
export function buildApiInvoiceFromForm(form: GramJs.payments.TypePaymentForm): ApiInvoice | undefined {
if (form instanceof GramJs.payments.PaymentFormStarGift) {
return undefined;
}
const {
invoice, description: text, title, photo,
} = form;

View File

@ -69,7 +69,6 @@ import {
buildInputPollFromExisting,
buildInputReaction,
buildInputReplyTo,
buildInputReportReason,
buildInputStory,
buildInputTextWithEntities,
buildMessageFromUpdate,
@ -887,14 +886,14 @@ export async function deleteSavedHistory({
}
export async function reportMessages({
peer, messageIds, reason, description,
peer, messageIds, description,
}: {
peer: ApiPeer; messageIds: number[]; reason: ApiReportReason; description?: string;
}) {
const result = await invokeRequest(new GramJs.messages.Report({
peer: buildInputPeer(peer.id, peer.accessHash),
id: messageIds,
reason: buildInputReportReason(reason),
option: Buffer.alloc(0),
message: description,
}));

View File

@ -176,7 +176,7 @@ export async function getPaymentForm(inputInvoice: ApiRequestInputInvoice, theme
themeParams: theme ? buildInputThemeParams(theme) : undefined,
}));
if (!result) {
if (!result || result instanceof GramJs.payments.PaymentFormStarGift) {
return undefined;
}
@ -185,8 +185,8 @@ export async function getPaymentForm(inputInvoice: ApiRequestInputInvoice, theme
}
return {
form: buildApiPaymentForm(result),
invoice: buildApiInvoiceFromForm(result),
form: buildApiPaymentForm(result)!,
invoice: buildApiInvoiceFromForm(result)!,
};
}

View File

@ -24,7 +24,6 @@ import {
buildInputPeer,
buildInputPrivacyRules,
buildInputReaction,
buildInputReportReason,
} from '../gramjsBuilders';
import { addStoryToLocalDb } from '../helpers';
import { invokeRequest } from './client';
@ -332,7 +331,6 @@ export async function fetchStoryLink({ peer, storyId }: { peer: ApiPeer ; storyI
export function reportStory({
peer,
storyId,
reason,
description,
}: {
peer: ApiPeer; storyId: number; reason: ApiReportReason; description?: string;
@ -340,7 +338,7 @@ export function reportStory({
return invokeRequest(new GramJs.stories.Report({
peer: buildInputPeer(peer.id, peer.accessHash),
id: [storyId],
reason: buildInputReportReason(reason),
option: Buffer.alloc(0),
message: description,
}));
}

View File

@ -895,11 +895,11 @@ interface ApiKeyboardButtonUrlAuth {
buttonId: number;
}
export type ApiTranscription = {
interface ApiKeyboardButtonCopy {
type: 'copy';
text: string;
isPending?: boolean;
transcriptionId: string;
};
copyText: string;
}
export type ApiKeyboardButton = (
ApiKeyboardButtonSimple
@ -912,6 +912,7 @@ export type ApiKeyboardButton = (
| ApiKeyboardButtonWebView
| ApiKeyboardButtonSimpleWebView
| ApiKeyboardButtonUrlAuth
| ApiKeyboardButtonCopy
);
export type ApiKeyboardButtons = ApiKeyboardButton[][];
@ -923,6 +924,12 @@ export type ApiReplyKeyboard = {
[K in 'inlineButtons' | 'keyboardButtons']?: ApiKeyboardButtons;
};
export type ApiTranscription = {
text: string;
isPending?: boolean;
transcriptionId: string;
};
export type ApiMessageSearchType = 'text' | 'media' | 'documents' | 'links' | 'audio' | 'voice' | 'profilePhoto';
export type ApiGlobalMessageSearchType = 'text' | 'channels' | 'media' | 'documents' | 'links' | 'audio' | 'voice';

View File

@ -42,7 +42,6 @@ import {
HEART_REACTION,
MAX_UPLOAD_FILEPART_SIZE,
ONE_TIME_MEDIA_TTL_SECONDS,
REPLIES_USER_ID,
SCHEDULED_WHEN_ONLINE,
SEND_MESSAGE_ACTION_INTERVAL,
SERVICE_NOTIFICATIONS_USER_ID,
@ -57,6 +56,7 @@ import {
isChatChannel,
isChatSuperGroup,
isSameReaction,
isSystemBot,
isUserId,
} from '../../global/helpers';
import {
@ -2075,7 +2075,7 @@ export default memo(withGlobal<OwnProps>(
chatId, threadId, storyId, messageListType, isMobile, type,
}): StateProps => {
const chat = selectChat(global, chatId);
const chatBot = chatId !== REPLIES_USER_ID ? selectBot(global, chatId) : undefined;
const chatBot = !isSystemBot(chatId) ? selectBot(global, chatId) : undefined;
const isChatWithBot = Boolean(chatBot);
const isChatWithSelf = selectIsChatWithSelf(global, chatId);
const isChatWithUser = isUserId(chatId);

View File

@ -12,13 +12,13 @@ import type {
import type { IAlbum } from '../../types';
import type { IRadioOption } from '../ui/CheckboxGroup';
import { REPLIES_USER_ID } from '../../config';
import {
getHasAdminRight,
getPrivateChatUserId,
getUserFirstOrLastName, getUserFullName,
isChatBasicGroup,
isChatSuperGroup, isOwnMessage,
isSystemBot,
isUserId,
} from '../../global/helpers';
import {
@ -449,7 +449,7 @@ export default memo(withGlobal<OwnProps>(
: undefined;
const isChatWithBot = Boolean(deleteMessageModal && deleteMessageModal.message
&& selectBot(global, deleteMessageModal.message.chatId));
const chatBot = Boolean(chat && chat.id !== REPLIES_USER_ID && selectBot(global, chat.id));
const chatBot = Boolean(chat && !isSystemBot(chat.id) && selectBot(global, chat.id));
const canBanUsers = chat && (chat.isCreator || getHasAdminRight(chat, 'banUsers'));
const isOwn = deleteMessageModal && deleteMessageModal.message && isOwnMessage(deleteMessageModal.message);

View File

@ -10,7 +10,12 @@ import type { CustomPeer } from '../../types';
import { EMOJI_STATUS_LOOP_LIMIT } from '../../config';
import {
getChatTitle, getUserFullName, isAnonymousForwardsChat, isChatWithRepliesBot, isPeerUser,
getChatTitle,
getUserFullName,
isAnonymousForwardsChat,
isChatWithRepliesBot,
isChatWithVerificationCodesBot,
isPeerUser,
} from '../../global/helpers';
import buildClassName from '../../util/buildClassName';
import { copyTextToClipboard } from '../../util/clipboard';
@ -95,19 +100,13 @@ const FullNameTitle: FC<OwnProps> = ({
return lang('RepliesTitle');
}
if (isChatWithVerificationCodesBot(realPeer!.id)) {
return lang('VerifyCodesNotifications');
}
return undefined;
}, [customPeer, isSavedDialog, isSavedMessages, lang, realPeer]);
if (specialTitle) {
return (
<div className={buildClassName('title', styles.root, className)}>
<h3 className={buildClassName('fullName', styles.fullName, !allowMultiLine && styles.ellipsis)}>
{specialTitle}
</h3>
</div>
);
}
return (
<div className={buildClassName('title', styles.root, className)}>
<h3
@ -121,7 +120,7 @@ const FullNameTitle: FC<OwnProps> = ({
)}
onClick={handleTitleClick}
>
{renderText(title || '')}
{specialTitle || renderText(title || '')}
</h3>
{!iconElement && peer && (
<>

View File

@ -10,7 +10,7 @@ import type { IconName } from '../../types/icons';
import { MediaViewerOrigin } from '../../types';
import {
getMainUsername, getUserStatus, isUserOnline,
getMainUsername, getUserStatus, isSystemBot, isUserOnline,
} from '../../global/helpers';
import { selectChatMessages, selectUser, selectUserStatus } from '../../global/selectors';
import buildClassName from '../../util/buildClassName';
@ -170,6 +170,10 @@ const PrivateChatInfo: FC<OwnProps & StateProps> = ({
return <TypingStatus typingStatus={typingStatus} />;
}
if (isSystemBot(user.id)) {
return undefined;
}
const translatedStatus = getUserStatus(lang, user, userStatus);
const mainUserNameClassName = buildClassName('handle', translatedStatus && 'withStatus');
return (

View File

@ -8,7 +8,7 @@ import type {
import { MediaViewerOrigin } from '../../types';
import {
getUserStatus, isAnonymousForwardsChat, isChatChannel, isUserOnline,
getUserStatus, isAnonymousForwardsChat, isChatChannel, isSystemBot, isUserOnline,
} from '../../global/helpers';
import {
selectChat,
@ -251,7 +251,8 @@ const ProfileInfo: FC<OwnProps & StateProps> = ({
function renderStatus() {
const isAnonymousForwards = isAnonymousForwardsChat(peerId);
if (isAnonymousForwards) return undefined;
const isSystemBotChat = isSystemBot(peerId);
if (isAnonymousForwards || isSystemBotChat) return undefined;
if (user) {
return (

View File

@ -498,8 +498,8 @@ function processEntity({
case ApiMessageEntityTypes.Code:
return (
<code
className={buildClassName('text-entity-code', !isProtected && 'clickable')}
onClick={!isProtected ? handleCodeClick : undefined}
className={buildClassName('text-entity-code', 'clickable')}
onClick={handleCodeClick}
role="textbox"
tabIndex={0}
data-entity-type={entity.type}

View File

@ -4,6 +4,7 @@ import React, { memo, useEffect, useRef } from '../../../lib/teact/teact';
import { ApiMessageEntityTypes } from '../../../api/types';
import { createClassNameBuilder } from '../../../util/buildClassName';
import stopEvent from '../../../util/stopEvent';
import useFlag from '../../../hooks/useFlag';
import useLastCallback from '../../../hooks/useLastCallback';
@ -31,8 +32,9 @@ const Spoiler = ({
const handleClick = useLastCallback((e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
if (!containerId) return;
e.preventDefault();
e.stopPropagation();
if (!isRevealed) {
stopEvent(e);
}
revealByContainerId.get(containerId)?.forEach((reveal) => reveal());
});

View File

@ -24,7 +24,6 @@ type OwnProps = {
};
type StateProps = {
shouldShowLoginCodeInChatList?: boolean;
shouldForceHttpTransport?: boolean;
shouldAllowHttpTransport?: boolean;
shouldCollectDebugLogs?: boolean;
@ -34,7 +33,6 @@ type StateProps = {
const SettingsExperimental: FC<OwnProps & StateProps> = ({
isActive,
onReset,
shouldShowLoginCodeInChatList,
shouldForceHttpTransport,
shouldAllowHttpTransport,
shouldCollectDebugLogs,
@ -84,13 +82,6 @@ const SettingsExperimental: FC<OwnProps & StateProps> = ({
<div className="title">Launch some confetti!</div>
</ListItem>
<Checkbox
label="Show login code in chat list"
checked={Boolean(shouldShowLoginCodeInChatList)}
// eslint-disable-next-line react/jsx-no-bind
onCheck={() => setSettingOption({ shouldShowLoginCodeInChatList: !shouldShowLoginCodeInChatList })}
/>
<Checkbox
label="Allow HTTP Transport"
checked={Boolean(shouldAllowHttpTransport)}
@ -142,7 +133,6 @@ const SettingsExperimental: FC<OwnProps & StateProps> = ({
export default memo(withGlobal(
(global): StateProps => {
return {
shouldShowLoginCodeInChatList: global.settings.byKey.shouldShowLoginCodeInChatList,
shouldForceHttpTransport: global.settings.byKey.shouldForceHttpTransport,
shouldAllowHttpTransport: global.settings.byKey.shouldAllowHttpTransport,
shouldCollectDebugLogs: global.settings.byKey.shouldCollectDebugLogs,

View File

@ -9,7 +9,6 @@ import type { IAnchorPosition, ThreadId } from '../../types';
import type { IconName } from '../../types/icons';
import { MAIN_THREAD_ID } from '../../api/types';
import { REPLIES_USER_ID } from '../../config';
import {
getCanAddContact,
getCanDeleteChat,
@ -18,6 +17,7 @@ import {
getIsSavedDialog,
isChatChannel,
isChatGroup,
isSystemBot,
isUserId,
isUserRightBanned,
selectIsChatMuted,
@ -752,7 +752,7 @@ export default memo(withGlobal<OwnProps>(
const canReportChat = isMainThread && (isChatChannel(chat) || isChatGroup(chat) || (user && !user.isSelf));
const { chatId: currentChatId, threadId: currentThreadId } = selectCurrentMessageList(global) || {};
const chatBot = chatId !== REPLIES_USER_ID ? selectBot(global, chatId) : undefined;
const chatBot = !isSystemBot(chatId) ? selectBot(global, chatId) : undefined;
const userFullInfo = isPrivate ? selectUserFullInfo(global, chatId) : undefined;
const chatFullInfo = !isPrivate ? selectChatFullInfo(global, chatId) : undefined;
const fullInfo = userFullInfo || chatFullInfo;

View File

@ -26,7 +26,7 @@ import {
isAnonymousForwardsChat,
isChatChannel,
isChatGroup,
isChatWithRepliesBot,
isSystemBot,
isUserId,
} from '../../global/helpers';
import {
@ -101,7 +101,7 @@ type StateProps = {
isChannelChat?: boolean;
isGroupChat?: boolean;
isChatWithSelf?: boolean;
isRepliesChat?: boolean;
isSystemBotChat?: boolean;
isAnonymousForwards?: boolean;
isCreator?: boolean;
isChannelWithAvatars?: boolean;
@ -156,7 +156,7 @@ const MessageList: FC<OwnProps & StateProps> = ({
isSynced,
isReady,
isChatWithSelf,
isRepliesChat,
isSystemBotChat,
isAnonymousForwards,
isCreator,
isBot,
@ -629,7 +629,7 @@ const MessageList: FC<OwnProps & StateProps> = ({
const isPrivate = isUserId(chatId);
const withUsers = Boolean((!isPrivate && !isChannelChat)
|| isChatWithSelf || isRepliesChat || isAnonymousForwards || isChannelWithAvatars);
|| isChatWithSelf || isSystemBotChat || isAnonymousForwards || isChannelWithAvatars);
const noAvatars = Boolean(!withUsers || (isChannelChat && !isChannelWithAvatars));
const shouldRenderGreeting = isUserId(chatId) && !isChatWithSelf && !isBot && !isAnonymousForwards
&& type === 'thread'
@ -783,7 +783,7 @@ export default memo(withGlobal<OwnProps>(
isChannelWithAvatars: chat.areProfilesShown,
isCreator: chat.isCreator,
isChatWithSelf: selectIsChatWithSelf(global, chatId),
isRepliesChat: isChatWithRepliesBot(chatId),
isSystemBotChat: isSystemBot(chatId),
isAnonymousForwards: isAnonymousForwardsChat(chatId),
isBot: Boolean(chatBot),
isSynced: global.isSynced,

View File

@ -22,6 +22,7 @@
.bot-info-description {
padding: 0.5rem 1rem;
text-wrap: pretty;
}
.bot-info-title {

View File

@ -9,6 +9,7 @@ import {
getPhotoFullDimensions,
getVideoDimensions,
getVideoMediaHash,
isChatWithVerificationCodesBot,
} from '../../global/helpers';
import { selectBot, selectUserFullInfo } from '../../global/selectors';
import buildClassName from '../../util/buildClassName';
@ -34,6 +35,7 @@ type StateProps = {
};
const MessageListBotInfo: FC<OwnProps & StateProps> = ({
chatId,
botInfo,
isLoadingBotInfo,
isInMessageList,
@ -46,6 +48,8 @@ const MessageListBotInfo: FC<OwnProps & StateProps> = ({
? getVideoDimensions(botInfo.gif) : undefined;
const isBotInfoEmpty = botInfo && !botInfo.description && !botInfo.gif && !botInfo.photo;
const isVerifyCodes = isChatWithVerificationCodesBot(chatId);
const { width, height } = botInfoDimensions || {};
const isEmptyOrLoading = isBotInfoEmpty || isLoadingBotInfo;
@ -92,7 +96,12 @@ const MessageListBotInfo: FC<OwnProps & StateProps> = ({
forceAspectRatio
/>
)}
{botInfo.description && (
{isVerifyCodes && (
<div className={styles.botInfoDescription}>
{lang('VerifyChatInfo')}
</div>
)}
{!isVerifyCodes && botInfo.description && (
<div className={styles.botInfoDescription}>
<p className={styles.botInfoTitle}>{lang('BotInfoTitle')}</p>
{renderText(botInfo.description, ['br', 'emoji', 'links'])}

View File

@ -41,6 +41,8 @@ const InlineButtons: FC<OwnProps> = ({ message, onClick }) => {
case 'webView':
case 'simpleWebView':
return <Icon className="corner-icon" name="webapp" />;
case 'copy':
return <Icon className="corner-icon" name="copy" />;
}
return undefined;
};

View File

@ -55,12 +55,12 @@ import {
isChatChannel,
isChatGroup,
isChatPublic,
isChatWithRepliesBot,
isGeoLiveExpired,
isMessageLocal,
isMessageTranslatable,
isOwnMessage,
isReplyToMessage,
isSystemBot,
isUserId,
} from '../../../global/helpers';
import { getMessageReplyInfo, getStoryReplyInfo } from '../../../global/helpers/replies';
@ -1690,7 +1690,7 @@ export default memo(withGlobal<OwnProps>(
const chat = selectChat(global, chatId);
const isChatWithSelf = selectIsChatWithSelf(global, chatId);
const isRepliesChat = isChatWithRepliesBot(chatId);
const isSystemBotChat = isSystemBot(chatId);
const isAnonymousForwards = isAnonymousForwardsChat(chatId);
const isChannel = chat && isChatChannel(chat);
const isGroup = chat && isChatGroup(chat);
@ -1719,11 +1719,12 @@ export default memo(withGlobal<OwnProps>(
const replyMessage = replyToMsgId ? selectChatMessage(global, replyToPeerId || chatId, replyToMsgId) : undefined;
const forwardHeader = forwardInfo || replyFrom;
const replyMessageSender = replyMessage ? selectSender(global, replyMessage)
: forwardHeader && !isRepliesChat && !isAnonymousForwards
: forwardHeader && !isSystemBotChat && !isAnonymousForwards
? selectSenderFromHeader(global, forwardHeader) : undefined;
const replyMessageForwardSender = replyMessage && selectForwardedSender(global, replyMessage);
const replyMessageChat = replyToPeerId ? selectChat(global, replyToPeerId) : undefined;
const isReplyPrivate = !isRepliesChat && !isAnonymousForwards && replyMessageChat && !isChatPublic(replyMessageChat)
const isReplyPrivate = !isSystemBotChat && !isAnonymousForwards && replyMessageChat
&& !isChatPublic(replyMessageChat)
&& (replyMessageChat.isNotJoined || replyMessageChat.isRestricted);
const isReplyToTopicStart = replyMessage?.content.action?.type === 'topicCreate';
const replyStory = storyReplyId && storyReplyPeerId
@ -1827,7 +1828,7 @@ export default memo(withGlobal<OwnProps>(
isForwarding,
reactionMessage,
isChatWithSelf,
isRepliesChat,
isRepliesChat: isSystemBotChat,
isAnonymousForwards,
isChannel,
isGroup,

View File

@ -13,9 +13,11 @@ import type {
CustomPeer, MiddleSearchParams, MiddleSearchType, ThreadId,
} from '../../../types';
import { ANONYMOUS_USER_ID, REPLIES_USER_ID } from '../../../config';
import { ANONYMOUS_USER_ID } from '../../../config';
import { requestMeasure, requestMutation, requestNextMutation } from '../../../lib/fasterdom/fasterdom';
import { getIsSavedDialog, getReactionKey, isSameReaction } from '../../../global/helpers';
import {
getIsSavedDialog, getReactionKey, isSameReaction, isSystemBot,
} from '../../../global/helpers';
import {
selectChat,
selectChatMessage,
@ -404,7 +406,7 @@ const MiddleSearch: FC<StateProps> = ({
return undefined;
}
const originalSender = (isSavedMessages || chatId === REPLIES_USER_ID || chatId === ANONYMOUS_USER_ID)
const originalSender = (isSavedMessages || isSystemBot(chatId) || chatId === ANONYMOUS_USER_ID)
? selectForwardedSender(global, message) : undefined;
const messageSender = selectSender(global, message);
const messageChat = selectChat(global, message.chatId);

View File

@ -303,6 +303,7 @@ export const HEART_REACTION: ApiReactionEmoji = {
// MTProto constants
export const SERVICE_NOTIFICATIONS_USER_ID = '777000';
export const REPLIES_USER_ID = '1271266957'; // TODO For Test connection ID must be equal to 708513
export const VERIFICATION_CODES_USER_ID = '489000';
export const ANONYMOUS_USER_ID = '2666000';
export const RESTRICTED_EMOJI_SET_ID = '7173162320003080';
export const CHANNEL_ID_LENGTH = 14; // 14 symbols, based on TDLib's `ZERO_CHANNEL_ID = -1000000000000`

View File

@ -10,6 +10,7 @@ import {
import { ManagementProgress } from '../../../types';
import { BOT_FATHER_USERNAME, GENERAL_REFETCH_INTERVAL } from '../../../config';
import { copyTextToClipboard } from '../../../util/clipboard';
import { getCurrentTabId } from '../../../util/establishMultitabRole';
import { oldTranslate } from '../../../util/oldLangProvider';
import PopupManager from '../../../util/PopupManager';
@ -78,6 +79,11 @@ addActionHandler('clickBotInlineButton', (global, actions, payload): ActionRetur
actions.openUrl({ url, tabId });
break;
}
case 'copy': {
copyTextToClipboard(button.copyText);
actions.showNotification({ message: oldTranslate('ExactTextCopied', button.copyText), tabId });
break;
}
case 'callback': {
void answerCallbackButton(global, actions, chat, messageId, button.data, undefined, tabId);
break;

View File

@ -831,6 +831,13 @@ addActionHandler('reportMessages', async (global, actions, payload): Promise<voi
return;
}
// TODO: Remove after implementing the new report system
if (messageIds) {
// eslint-disable-next-line no-console
console.warn('UNSUPPORTED');
return;
}
const { chatId } = currentMessageList;
const chat = selectChat(global, chatId)!;

View File

@ -423,6 +423,13 @@ addActionHandler('reportStory', async (global, actions, payload): Promise<void>
return;
}
// TODO: Remove after implementing the new report system
if (storyId) {
// eslint-disable-next-line no-console
console.warn('UNSUPPORTED');
return;
}
const result = await callApi('reportStory', {
peer,
storyId,

View File

@ -3,6 +3,8 @@ import type {
WebApp,
} from '../types';
import { REPLIES_USER_ID, VERIFICATION_CODES_USER_ID } from '../../config';
export function getBotCoverMediaHash(photo: ApiPhoto) {
return `photo${photo.id}?size=x`;
}
@ -20,3 +22,7 @@ export function getWebAppKey(webApp: Partial<WebApp>) {
if (webApp.appName) return `${webApp.botId}?appName=${webApp.appName}`;
return webApp.botId;
}
export function isSystemBot(botId: string) {
return botId === REPLIES_USER_ID || botId === VERIFICATION_CODES_USER_ID;
}

View File

@ -18,10 +18,12 @@ import { MAIN_THREAD_ID } from '../../api/types';
import {
ANONYMOUS_USER_ID,
ARCHIVED_FOLDER_ID, CHANNEL_ID_LENGTH, GENERAL_TOPIC_ID, REPLIES_USER_ID, TME_LINK_PREFIX,
VERIFICATION_CODES_USER_ID,
} from '../../config';
import { formatDateToString, formatTime } from '../../util/dates/dateFormat';
import { prepareSearchWordsForNeedle } from '../../util/searchWords';
import { getGlobal } from '..';
import { isSystemBot } from './bots';
import { getMainUsername, getUserFirstOrLastName } from './users';
const FOREVER_BANNED_DATE = Date.now() / 1000 + 31622400; // 366 days
@ -70,6 +72,10 @@ export function isChatWithRepliesBot(chatId: string) {
return chatId === REPLIES_USER_ID;
}
export function isChatWithVerificationCodesBot(chatId: string) {
return chatId === VERIFICATION_CODES_USER_ID;
}
export function isAnonymousForwardsChat(chatId: string) {
return chatId === ANONYMOUS_USER_ID;
}
@ -163,7 +169,7 @@ export function getCanPostInChat(
}
if (chat.isRestricted || chat.isForbidden || chat.migratedTo
|| (!isMessageThread && chat.isNotJoined) || isChatWithRepliesBot(chat.id) || isAnonymousForwardsChat(chat.id)) {
|| (!isMessageThread && chat.isNotJoined) || isSystemBot(chat.id) || isAnonymousForwardsChat(chat.id)) {
return false;
}

View File

@ -19,6 +19,7 @@ import {
SUPPORTED_PHOTO_CONTENT_TYPES,
SUPPORTED_VIDEO_CONTENT_TYPES,
TME_LINK_PREFIX,
VERIFICATION_CODES_USER_ID,
VIDEO_STICKER_MIME_TYPE,
} from '../../config';
import { areSortedArraysIntersecting, unique } from '../../util/iteratees';
@ -279,20 +280,41 @@ export function extractMessageText(message: ApiMessage | ApiStory, inChatList =
const { text } = contentText;
let { entities } = contentText;
if (text && inChatList && 'chatId' in message && message.chatId === SERVICE_NOTIFICATIONS_USER_ID
// eslint-disable-next-line eslint-multitab-tt/no-immediate-global
&& !getGlobal().settings.byKey.shouldShowLoginCodeInChatList) {
const authCode = text.match(/^\D*([\d-]{5,7})\D/)?.[1];
if (authCode) {
entities = [
...entities || [],
{
type: ApiMessageEntityTypes.Spoiler,
offset: text.indexOf(authCode),
length: authCode.length,
},
];
entities.sort((a, b) => (a.offset > b.offset ? 1 : -1));
if (text && inChatList && 'chatId' in message) {
if (message.chatId === SERVICE_NOTIFICATIONS_USER_ID) {
const authCode = text.match(/^\D*([\d-]{5,7})\D/)?.[1];
if (authCode) {
entities = [
...entities || [],
{
type: ApiMessageEntityTypes.Spoiler,
offset: text.indexOf(authCode),
length: authCode.length,
},
];
entities.sort((a, b) => (a.offset > b.offset ? 1 : -1));
}
}
if (message.chatId === VERIFICATION_CODES_USER_ID && entities) {
// Wrap code entities in spoiler
const hasCodeEntities = entities.some((entity) => entity.type === ApiMessageEntityTypes.Code);
if (hasCodeEntities) {
const oldEntities = entities;
entities = [];
for (let i = 0; i < oldEntities.length; i++) {
const entity = oldEntities[i];
if (entity.type === ApiMessageEntityTypes.Code) {
entities.push({
type: ApiMessageEntityTypes.Spoiler,
offset: entity.offset,
length: entity.length,
});
}
entities.push(entity);
}
}
}
}

View File

@ -16,7 +16,7 @@ import type {
import { ApiMessageEntityTypes, MAIN_THREAD_ID } from '../../api/types';
import {
ANONYMOUS_USER_ID, GENERAL_TOPIC_ID, REPLIES_USER_ID, SERVICE_NOTIFICATIONS_USER_ID,
ANONYMOUS_USER_ID, GENERAL_TOPIC_ID, SERVICE_NOTIFICATIONS_USER_ID,
} from '../../config';
import { getCurrentTabId } from '../../util/establishMultitabRole';
import { findLast } from '../../util/iteratees';
@ -1314,7 +1314,7 @@ export function selectShouldSchedule<T extends GlobalState>(
export function selectCanScheduleUntilOnline<T extends GlobalState>(global: T, id: string) {
const isChatWithSelf = selectIsChatWithSelf(global, id);
const chatBot = id === REPLIES_USER_ID && selectBot(global, id);
const chatBot = selectBot(global, id);
return Boolean(
!isChatWithSelf && !chatBot && isUserId(id) && selectUserStatus(global, id)?.wasOnline,
);

View File

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

View File

@ -70,7 +70,7 @@ namespace Api {
export type TypeChatPhoto = ChatPhotoEmpty | ChatPhoto;
export type TypeMessage = MessageEmpty | Message | MessageService;
export type TypeMessageMedia = MessageMediaEmpty | MessageMediaPhoto | MessageMediaGeo | MessageMediaContact | MessageMediaUnsupported | MessageMediaDocument | MessageMediaWebPage | MessageMediaVenue | MessageMediaGame | MessageMediaInvoice | MessageMediaGeoLive | MessageMediaPoll | MessageMediaDice | MessageMediaStory | MessageMediaGiveaway | MessageMediaGiveawayResults | MessageMediaPaidMedia;
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 | MessageActionPaymentRefunded | MessageActionGiftStars | MessageActionPrizeStars;
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 | MessageActionPaymentRefunded | MessageActionGiftStars | MessageActionPrizeStars | MessageActionStarGift;
export type TypeDialog = Dialog | DialogFolder;
export type TypePhoto = PhotoEmpty | Photo;
export type TypePhotoSize = PhotoSizeEmpty | PhotoSize | PhotoCachedSize | PhotoStrippedSize | PhotoSizeProgressive | PhotoPathSize;
@ -278,7 +278,7 @@ namespace Api {
export type TypeBotMenuButton = BotMenuButtonDefault | BotMenuButtonCommands | BotMenuButton;
export type TypeNotificationSound = NotificationSoundDefault | NotificationSoundNone | NotificationSoundLocal | NotificationSoundRingtone;
export type TypeAttachMenuPeerType = AttachMenuPeerTypeSameBotPM | AttachMenuPeerTypeBotPM | AttachMenuPeerTypePM | AttachMenuPeerTypeChat | AttachMenuPeerTypeBroadcast;
export type TypeInputInvoice = InputInvoiceMessage | InputInvoiceSlug | InputInvoicePremiumGiftCode | InputInvoiceStars | InputInvoiceChatInviteSubscription;
export type TypeInputInvoice = InputInvoiceMessage | InputInvoiceSlug | InputInvoicePremiumGiftCode | InputInvoiceStars | InputInvoiceChatInviteSubscription | InputInvoiceStarGift;
export type TypeInputStorePaymentPurpose = InputStorePaymentPremiumSubscription | InputStorePaymentGiftPremium | InputStorePaymentPremiumGiftCode | InputStorePaymentPremiumGiveaway | InputStorePaymentStarsTopup | InputStorePaymentStarsGift | InputStorePaymentStarsGiveaway;
export type TypePremiumGiftOption = PremiumGiftOption;
export type TypePaymentFormMethod = PaymentFormMethod;
@ -377,6 +377,10 @@ namespace Api {
export type TypeMessageReactor = MessageReactor;
export type TypeStarsGiveawayOption = StarsGiveawayOption;
export type TypeStarsGiveawayWinnersOption = StarsGiveawayWinnersOption;
export type TypeStarGift = StarGift;
export type TypeUserStarGift = UserStarGift;
export type TypeMessageReportOption = MessageReportOption;
export type TypeReportResult = ReportResultChooseOption | ReportResultAddComment | ReportResultReported;
export type TypeResPQ = ResPQ;
export type TypeP_Q_inner_data = PQInnerData | PQInnerDataDc | PQInnerDataTemp | PQInnerDataTempDc;
export type TypeServer_DH_Params = ServerDHParamsFail | ServerDHParamsOk;
@ -565,7 +569,7 @@ namespace Api {
}
export namespace payments {
export type TypePaymentForm = payments.PaymentForm | payments.PaymentFormStars;
export type TypePaymentForm = payments.PaymentForm | payments.PaymentFormStars | payments.PaymentFormStarGift;
export type TypeValidatedRequestedInfo = payments.ValidatedRequestedInfo;
export type TypePaymentResult = payments.PaymentResult | payments.PaymentVerificationNeeded;
export type TypePaymentReceipt = payments.PaymentReceipt | payments.PaymentReceiptStars;
@ -578,6 +582,8 @@ namespace Api {
export type TypeStarsRevenueStats = payments.StarsRevenueStats;
export type TypeStarsRevenueWithdrawalUrl = payments.StarsRevenueWithdrawalUrl;
export type TypeStarsRevenueAdsAccountUrl = payments.StarsRevenueAdsAccountUrl;
export type TypeStarGifts = payments.StarGiftsNotModified | payments.StarGifts;
export type TypeUserStarGifts = payments.UserStarGifts;
}
export namespace phone {
@ -2322,6 +2328,23 @@ namespace Api {
boostPeer: Api.TypePeer;
giveawayMsgId: int;
};
export class MessageActionStarGift extends VirtualClass<{
// flags: undefined;
nameHidden?: true;
saved?: true;
converted?: true;
gift: Api.TypeStarGift;
message?: Api.TypeTextWithEntities;
convertStars: long;
}> {
// flags: undefined;
nameHidden?: true;
saved?: true;
converted?: true;
gift: Api.TypeStarGift;
message?: Api.TypeTextWithEntities;
convertStars: long;
};
export class Dialog extends VirtualClass<{
// flags: undefined;
pinned?: true;
@ -2658,6 +2681,7 @@ namespace Api {
birthday?: Api.TypeBirthday;
personalChannelId?: long;
personalChannelMessage?: int;
stargiftsCount?: int;
}> {
// flags: undefined;
blocked?: true;
@ -2702,6 +2726,7 @@ namespace Api {
birthday?: Api.TypeBirthday;
personalChannelId?: long;
personalChannelMessage?: int;
stargiftsCount?: int;
};
export class Contact extends VirtualClass<{
userId: long;
@ -8822,6 +8847,19 @@ namespace Api {
}> {
hash: string;
};
export class InputInvoiceStarGift extends VirtualClass<{
// flags: undefined;
hideName?: true;
userId: Api.TypeInputUser;
giftId: long;
message?: Api.TypeTextWithEntities;
}> {
// flags: undefined;
hideName?: true;
userId: Api.TypeInputUser;
giftId: long;
message?: Api.TypeTextWithEntities;
};
export class InputStorePaymentPremiumSubscription extends VirtualClass<{
// flags: undefined;
restore?: true;
@ -10279,6 +10317,7 @@ namespace Api {
extendedMedia?: Api.TypeMessageMedia[];
subscriptionPeriod?: int;
giveawayPostId?: int;
stargift?: Api.TypeStarGift;
}> {
// flags: undefined;
refund?: true;
@ -10300,6 +10339,7 @@ namespace Api {
extendedMedia?: Api.TypeMessageMedia[];
subscriptionPeriod?: int;
giveawayPostId?: int;
stargift?: Api.TypeStarGift;
};
export class FoundStory extends VirtualClass<{
peer: Api.TypePeer;
@ -10442,6 +10482,70 @@ namespace Api {
users: int;
perUserStars: long;
};
export class StarGift extends VirtualClass<{
// flags: undefined;
limited?: true;
id: long;
sticker: Api.TypeDocument;
stars: long;
availabilityRemains?: int;
availabilityTotal?: int;
convertStars: long;
}> {
// flags: undefined;
limited?: true;
id: long;
sticker: Api.TypeDocument;
stars: long;
availabilityRemains?: int;
availabilityTotal?: int;
convertStars: long;
};
export class UserStarGift extends VirtualClass<{
// flags: undefined;
nameHidden?: true;
unsaved?: true;
fromId?: long;
date: int;
gift: Api.TypeStarGift;
message?: Api.TypeTextWithEntities;
msgId?: int;
convertStars?: long;
}> {
// flags: undefined;
nameHidden?: true;
unsaved?: true;
fromId?: long;
date: int;
gift: Api.TypeStarGift;
message?: Api.TypeTextWithEntities;
msgId?: int;
convertStars?: long;
};
export class MessageReportOption extends VirtualClass<{
text: string;
option: bytes;
}> {
text: string;
option: bytes;
};
export class ReportResultChooseOption extends VirtualClass<{
title: string;
options: Api.TypeMessageReportOption[];
}> {
title: string;
options: Api.TypeMessageReportOption[];
};
export class ReportResultAddComment extends VirtualClass<{
// flags: undefined;
optional?: true;
option: bytes;
}> {
// flags: undefined;
optional?: true;
option: bytes;
};
export class ReportResultReported extends VirtualClass<void> {};
export class ResPQ extends VirtualClass<{
nonce: int128;
serverNonce: int128;
@ -12525,6 +12629,13 @@ namespace Api {
invoice: Api.TypeInvoice;
users: Api.TypeUser[];
};
export class PaymentFormStarGift extends VirtualClass<{
formId: long;
invoice: Api.TypeInvoice;
}> {
formId: long;
invoice: Api.TypeInvoice;
};
export class ValidatedRequestedInfo extends VirtualClass<{
// flags: undefined;
id?: string;
@ -12724,6 +12835,27 @@ namespace Api {
}> {
url: string;
};
export class StarGiftsNotModified extends VirtualClass<void> {};
export class StarGifts extends VirtualClass<{
hash: int;
gifts: Api.TypeStarGift[];
}> {
hash: int;
gifts: Api.TypeStarGift[];
};
export class UserStarGifts extends VirtualClass<{
// flags: undefined;
count: int;
gifts: Api.TypeUserStarGift[];
nextOffset?: string;
users: Api.TypeUser[];
}> {
// flags: undefined;
count: int;
gifts: Api.TypeUserStarGift[];
nextOffset?: string;
users: Api.TypeUser[];
};
}
export namespace phone {
@ -14743,12 +14875,12 @@ namespace Api {
export class Report extends Request<Partial<{
peer: Api.TypeInputPeer;
id: int[];
reason: Api.TypeReportReason;
option: bytes;
message: string;
}>, Bool> {
}>, Api.TypeReportResult> {
peer: Api.TypeInputPeer;
id: int[];
reason: Api.TypeReportReason;
option: bytes;
message: string;
};
export class GetChats extends Request<Partial<{
@ -17777,11 +17909,9 @@ namespace Api {
limit: int;
};
export class SendStarsForm extends Request<Partial<{
// flags: undefined;
formId: long;
invoice: Api.TypeInputInvoice;
}>, payments.TypePaymentResult> {
// flags: undefined;
formId: long;
invoice: Api.TypeInputInvoice;
};
@ -17859,6 +17989,38 @@ namespace Api {
subscriptionId: string;
};
export class GetStarsGiveawayOptions extends Request<void, Api.TypeStarsGiveawayOption[]> {};
export class GetStarGifts extends Request<Partial<{
hash: int;
}>, payments.TypeStarGifts> {
hash: int;
};
export class GetUserStarGifts extends Request<Partial<{
userId: Api.TypeInputUser;
offset: string;
limit: int;
}>, payments.TypeUserStarGifts> {
userId: Api.TypeInputUser;
offset: string;
limit: int;
};
export class SaveStarGift extends Request<Partial<{
// flags: undefined;
unsave?: true;
userId: Api.TypeInputUser;
msgId: int;
}>, Bool> {
// flags: undefined;
unsave?: true;
userId: Api.TypeInputUser;
msgId: int;
};
export class ConvertStarGift extends Request<Partial<{
userId: Api.TypeInputUser;
msgId: int;
}>, Bool> {
userId: Api.TypeInputUser;
msgId: int;
};
}
export namespace stickers {
@ -18631,12 +18793,12 @@ namespace Api {
export class Report extends Request<Partial<{
peer: Api.TypeInputPeer;
id: int[];
reason: Api.TypeReportReason;
option: bytes;
message: string;
}>, Bool> {
}>, Api.TypeReportResult> {
peer: Api.TypeInputPeer;
id: int[];
reason: Api.TypeReportReason;
option: bytes;
message: string;
};
export class ActivateStealthMode extends Request<Partial<{
@ -18805,7 +18967,7 @@ namespace Api {
| 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.ReportSponsoredMessage | channels.RestrictSponsoredMessages | channels.SearchPosts
| 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 | bots.GetPopularAppBots | bots.AddPreviewMedia | bots.EditPreviewMedia | bots.DeletePreviewMedia | bots.ReorderPreviewMedias | bots.GetPreviewInfo | bots.GetPreviewMedias
| 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 | payments.GetStarsTopupOptions | payments.GetStarsStatus | payments.GetStarsTransactions | payments.SendStarsForm | payments.RefundStarsCharge | payments.GetStarsRevenueStats | payments.GetStarsRevenueWithdrawalUrl | payments.GetStarsRevenueAdsAccountUrl | payments.GetStarsTransactionsByID | payments.GetStarsGiftOptions | payments.GetStarsSubscriptions | payments.ChangeStarsSubscription | payments.FulfillStarsSubscription | payments.GetStarsGiveawayOptions
| 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 | payments.GetStarsTopupOptions | payments.GetStarsStatus | payments.GetStarsTransactions | payments.SendStarsForm | payments.RefundStarsCharge | payments.GetStarsRevenueStats | payments.GetStarsRevenueWithdrawalUrl | payments.GetStarsRevenueAdsAccountUrl | payments.GetStarsTransactionsByID | payments.GetStarsGiftOptions | payments.GetStarsSubscriptions | payments.ChangeStarsSubscription | payments.FulfillStarsSubscription | payments.GetStarsGiveawayOptions | payments.GetStarGifts | payments.GetUserStarGifts | payments.SaveStarGift | payments.ConvertStarGift
| 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

View File

@ -157,6 +157,7 @@ messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector<RequestedPe
messageActionPaymentRefunded#41b3e202 flags:# peer:Peer currency:string total_amount:long payload:flags.0?bytes charge:PaymentCharge = MessageAction;
messageActionGiftStars#45d5b021 flags:# currency:string amount:long stars:long crypto_currency:flags.0?string crypto_amount:flags.0?long transaction_id:flags.1?string = MessageAction;
messageActionPrizeStars#b00c47a2 flags:# unclaimed:flags.0?true stars:long transaction_id:string boost_peer:Peer giveaway_msg_id:int = MessageAction;
messageActionStarGift#9bb3ef44 flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true gift:StarGift message:flags.1?TextWithEntities convert_stars:long = 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;
@ -194,7 +195,7 @@ inputReportReasonGeoIrrelevant#dbd4feed = ReportReason;
inputReportReasonFake#f5ddd6e7 = ReportReason;
inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason;
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:# sponsored_enabled:flags2.7?true 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<PremiumGiftOption> 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;
userFull#1f58e369 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:# sponsored_enabled:flags2.7?true 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<PremiumGiftOption> 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 stargifts_count:flags2.8?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;
@ -752,6 +753,7 @@ inputWebFileAudioAlbumThumbLocation#f46fe924 flags:# small:flags.2?true document
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
payments.paymentForm#a0058751 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON additional_methods:flags.6?Vector<PaymentFormMethod> saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?Vector<PaymentSavedCredentials> users:Vector<User> = payments.PaymentForm;
payments.paymentFormStars#7bf6b15c flags:# form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice users:Vector<User> = payments.PaymentForm;
payments.paymentFormStarGift#b425cfe1 form_id:long invoice:Invoice = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo;
payments.paymentResult#4e5f810d updates:Updates = payments.PaymentResult;
payments.paymentVerificationNeeded#d8411139 url:string = payments.PaymentResult;
@ -1113,6 +1115,7 @@ inputInvoiceSlug#c326caef slug:string = InputInvoice;
inputInvoicePremiumGiftCode#98986c0d purpose:InputStorePaymentPurpose option:PremiumGiftCodeOption = InputInvoice;
inputInvoiceStars#65f00ce3 purpose:InputStorePaymentPurpose = InputInvoice;
inputInvoiceChatInviteSubscription#34e793f1 hash:string = InputInvoice;
inputInvoiceStarGift#25d8c1d8 flags:# hide_name:flags.0?true user_id:InputUser gift_id:long message:flags.1?TextWithEntities = InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
messages.transcribedAudio#cfb9d957 flags:# pending:flags.0?true transcription_id:long text:string trial_remains_num:flags.1?int trial_remains_until_date:flags.1?int = messages.TranscribedAudio;
help.premiumPromo#5334759c status_text:string status_entities:Vector<MessageEntity> video_sections:Vector<string> videos:Vector<Document> period_options:Vector<PremiumSubscriptionOption> users:Vector<User> = help.PremiumPromo;
@ -1330,7 +1333,7 @@ starsTransactionPeerFragment#e92fd902 = StarsTransactionPeer;
starsTransactionPeer#d80da15d peer:Peer = StarsTransactionPeer;
starsTransactionPeerAds#60682812 = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
starsTransaction#ee7522d5 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int giveaway_post_id:flags.13?int = StarsTransaction;
starsTransaction#a9ee4c2 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift = StarsTransaction;
payments.starsStatus#bbfa316c flags:# balance:long subscriptions:flags.1?Vector<StarsSubscription> subscriptions_next_offset:flags.2?string subscriptions_missing_balance:flags.4?long history:flags.3?Vector<StarsTransaction> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.StarsStatus;
foundStory#e87acbc0 peer:Peer story:StoryItem = FoundStory;
stories.foundStories#e2de7737 flags:# count:int stories:Vector<FoundStory> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = stories.FoundStories;
@ -1349,6 +1352,15 @@ starsSubscription#538ecf18 flags:# canceled:flags.0?true can_refulfill:flags.1?t
messageReactor#4ba3a95a flags:# top:flags.0?true my:flags.1?true anonymous:flags.2?true peer_id:flags.3?Peer count:int = MessageReactor;
starsGiveawayOption#94ce852a flags:# extended:flags.0?true default:flags.1?true stars:long yearly_boosts:int store_product:flags.2?string currency:string amount:long winners:Vector<StarsGiveawayWinnersOption> = StarsGiveawayOption;
starsGiveawayWinnersOption#54236209 flags:# default:flags.0?true users:int per_user_stars:long = StarsGiveawayWinnersOption;
starGift#aea174ee flags:# limited:flags.0?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int convert_stars:long = StarGift;
payments.starGiftsNotModified#a388a368 = payments.StarGifts;
payments.starGifts#901689ea hash:int gifts:Vector<StarGift> = payments.StarGifts;
userStarGift#eea49a6e flags:# name_hidden:flags.0?true unsaved:flags.5?true from_id:flags.1?long date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int convert_stars:flags.4?long = UserStarGift;
payments.userStarGifts#6b65b517 flags:# count:int gifts:Vector<UserStarGift> next_offset:flags.0?string users:Vector<User> = payments.UserStarGifts;
messageReportOption#7903e3d9 text:string option:bytes = MessageReportOption;
reportResultChooseOption#f0e4e0b6 title:string options:Vector<MessageReportOption> = ReportResult;
reportResultAddComment#6f09ac31 flags:# optional:flags.0?true option:bytes = ReportResult;
reportResultReported#8db33c4b = ReportResult;
---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;
@ -1439,7 +1451,7 @@ messages.sendMedia#7852834e flags:# silent:flags.5?true background:flags.6?true
messages.forwardMessages#d5039208 flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true noforwards:flags.14?true from_peer:InputPeer id:Vector<int> random_id:Vector<long> to_peer:InputPeer top_msg_id:flags.9?int schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut = Updates;
messages.reportSpam#cf1592db peer:InputPeer = Bool;
messages.getPeerSettings#efd9a6a2 peer:InputPeer = messages.PeerSettings;
messages.report#8953ab4e peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool;
messages.report#fc78af9b peer:InputPeer id:Vector<int> option:bytes message:string = ReportResult;
messages.getChats#49e9528f id:Vector<long> = messages.Chats;
messages.getFullChat#aeb00b34 chat_id:long = messages.ChatFull;
messages.editChatTitle#73783ffd chat_id:long title:string = Updates;
@ -1650,7 +1662,7 @@ payments.launchPrepaidGiveaway#5ff58f20 peer:InputPeer giveaway_id:long purpose:
payments.getStarsTopupOptions#c00ec7d3 = Vector<StarsTopupOption>;
payments.getStarsStatus#104fcfa7 peer:InputPeer = payments.StarsStatus;
payments.getStarsTransactions#69da4557 flags:# inbound:flags.0?true outbound:flags.1?true ascending:flags.2?true subscription_id:flags.3?string peer:InputPeer offset:string limit:int = payments.StarsStatus;
payments.sendStarsForm#2bb731d flags:# form_id:long invoice:InputInvoice = payments.PaymentResult;
payments.sendStarsForm#7998c914 form_id:long invoice:InputInvoice = payments.PaymentResult;
payments.refundStarsCharge#25ae8f4a user_id:InputUser charge_id:string = Updates;
payments.getStarsTransactionsByID#27842d2e peer:InputPeer id:Vector<InputStarsTransaction> = payments.StarsStatus;
payments.getStarsGiftOptions#d3c96bc8 flags:# user_id:flags.0?InputUser = Vector<StarsGiftOption>;
@ -1658,6 +1670,10 @@ payments.getStarsSubscriptions#32512c5 flags:# missing_balance:flags.0?true peer
payments.changeStarsSubscription#c7770878 flags:# peer:InputPeer subscription_id:string canceled:flags.0?Bool = Bool;
payments.fulfillStarsSubscription#cc5bebb3 peer:InputPeer subscription_id:string = Bool;
payments.getStarsGiveawayOptions#bd1efd3e = Vector<StarsGiveawayOption>;
payments.getStarGifts#c4563590 hash:int = payments.StarGifts;
payments.getUserStarGifts#5e72c7e1 user_id:InputUser offset:string limit:int = payments.UserStarGifts;
payments.saveStarGift#87acf08e flags:# unsave:flags.0?true user_id:InputUser msg_id:int = Bool;
payments.convertStarGift#421e027 user_id:InputUser msg_id:int = Bool;
phone.requestCall#42ff96ed flags:# video:flags.0?true user_id:InputUser random_id:int g_a_hash:bytes protocol:PhoneCallProtocol = phone.PhoneCall;
phone.acceptCall#3bd2b4a0 peer:InputPhoneCall g_b:bytes protocol:PhoneCallProtocol = phone.PhoneCall;
phone.confirmCall#2efe1722 peer:InputPhoneCall g_a:bytes key_fingerprint:long protocol:PhoneCallProtocol = phone.PhoneCall;
@ -1712,7 +1728,7 @@ stories.incrementStoryViews#b2028afb peer:InputPeer id:Vector<int> = Bool;
stories.getStoryViewsList#7ed23c57 flags:# just_contacts:flags.0?true reactions_first:flags.2?true forwards_first:flags.3?true peer:InputPeer q:flags.1?string id:int offset:string limit:int = stories.StoryViewsList;
stories.getStoriesViews#28e16cc8 peer:InputPeer id:Vector<int> = stories.StoryViews;
stories.exportStoryLink#7b8def20 peer:InputPeer id:int = ExportedStoryLink;
stories.report#1923fa8c peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool;
stories.report#19d8eb45 peer:InputPeer id:Vector<int> option:bytes message:string = ReportResult;
stories.activateStealthMode#57bbd166 flags:# past:flags.0?true future:flags.1?true = Updates;
stories.sendReaction#7fd736b2 flags:# add_to_recent:flags.0?true peer:InputPeer story_id:int reaction:Reaction = Updates;
stories.getPeerStories#2c4ada50 peer:InputPeer = stories.PeerStories;

View File

@ -376,5 +376,9 @@
"payments.getStarsGiveawayOptions",
"payments.refundStarsCharge",
"payments.getStarsGiftOptions",
"payments.getStarGifts",
"payments.getUserStarGifts",
"payments.saveStarGift",
"payments.convertStarGift",
"fragment.getCollectibleInfo"
]

View File

@ -183,6 +183,7 @@ messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector<RequestedPe
messageActionPaymentRefunded#41b3e202 flags:# peer:Peer currency:string total_amount:long payload:flags.0?bytes charge:PaymentCharge = MessageAction;
messageActionGiftStars#45d5b021 flags:# currency:string amount:long stars:long crypto_currency:flags.0?string crypto_amount:flags.0?long transaction_id:flags.1?string = MessageAction;
messageActionPrizeStars#b00c47a2 flags:# unclaimed:flags.0?true stars:long transaction_id:string boost_peer:Peer giveaway_msg_id:int = MessageAction;
messageActionStarGift#9bb3ef44 flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true gift:StarGift message:flags.1?TextWithEntities convert_stars:long = 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;
@ -234,7 +235,7 @@ inputReportReasonFake#f5ddd6e7 = ReportReason;
inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason;
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:# sponsored_enabled:flags2.7?true 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<PremiumGiftOption> 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;
userFull#1f58e369 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:# sponsored_enabled:flags2.7?true 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<PremiumGiftOption> 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 stargifts_count:flags2.8?int = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact;
@ -915,6 +916,7 @@ upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mti
payments.paymentForm#a0058751 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON additional_methods:flags.6?Vector<PaymentFormMethod> saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?Vector<PaymentSavedCredentials> users:Vector<User> = payments.PaymentForm;
payments.paymentFormStars#7bf6b15c flags:# form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice users:Vector<User> = payments.PaymentForm;
payments.paymentFormStarGift#b425cfe1 form_id:long invoice:Invoice = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo;
@ -1464,6 +1466,7 @@ inputInvoiceSlug#c326caef slug:string = InputInvoice;
inputInvoicePremiumGiftCode#98986c0d purpose:InputStorePaymentPurpose option:PremiumGiftCodeOption = InputInvoice;
inputInvoiceStars#65f00ce3 purpose:InputStorePaymentPurpose = InputInvoice;
inputInvoiceChatInviteSubscription#34e793f1 hash:string = InputInvoice;
inputInvoiceStarGift#25d8c1d8 flags:# hide_name:flags.0?true user_id:InputUser gift_id:long message:flags.1?TextWithEntities = InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
@ -1821,7 +1824,7 @@ starsTransactionPeerAds#60682812 = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
starsTransaction#ee7522d5 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int giveaway_post_id:flags.13?int = StarsTransaction;
starsTransaction#a9ee4c2 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift = StarsTransaction;
payments.starsStatus#bbfa316c flags:# balance:long subscriptions:flags.1?Vector<StarsSubscription> subscriptions_next_offset:flags.2?string subscriptions_missing_balance:flags.4?long history:flags.3?Vector<StarsTransaction> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.StarsStatus;
@ -1859,6 +1862,21 @@ starsGiveawayOption#94ce852a flags:# extended:flags.0?true default:flags.1?true
starsGiveawayWinnersOption#54236209 flags:# default:flags.0?true users:int per_user_stars:long = StarsGiveawayWinnersOption;
starGift#aea174ee flags:# limited:flags.0?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int convert_stars:long = StarGift;
payments.starGiftsNotModified#a388a368 = payments.StarGifts;
payments.starGifts#901689ea hash:int gifts:Vector<StarGift> = payments.StarGifts;
userStarGift#eea49a6e flags:# name_hidden:flags.0?true unsaved:flags.5?true from_id:flags.1?long date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int convert_stars:flags.4?long = UserStarGift;
payments.userStarGifts#6b65b517 flags:# count:int gifts:Vector<UserStarGift> next_offset:flags.0?string users:Vector<User> = payments.UserStarGifts;
messageReportOption#7903e3d9 text:string option:bytes = MessageReportOption;
reportResultChooseOption#f0e4e0b6 title:string options:Vector<MessageReportOption> = ReportResult;
reportResultAddComment#6f09ac31 flags:# optional:flags.0?true option:bytes = ReportResult;
reportResultReported#8db33c4b = ReportResult;
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@ -2055,7 +2073,7 @@ messages.sendMedia#7852834e flags:# silent:flags.5?true background:flags.6?true
messages.forwardMessages#d5039208 flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true noforwards:flags.14?true from_peer:InputPeer id:Vector<int> random_id:Vector<long> to_peer:InputPeer top_msg_id:flags.9?int schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut = Updates;
messages.reportSpam#cf1592db peer:InputPeer = Bool;
messages.getPeerSettings#efd9a6a2 peer:InputPeer = messages.PeerSettings;
messages.report#8953ab4e peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool;
messages.report#fc78af9b peer:InputPeer id:Vector<int> option:bytes message:string = ReportResult;
messages.getChats#49e9528f id:Vector<long> = messages.Chats;
messages.getFullChat#aeb00b34 chat_id:long = messages.ChatFull;
messages.editChatTitle#73783ffd chat_id:long title:string = Updates;
@ -2413,7 +2431,7 @@ payments.launchPrepaidGiveaway#5ff58f20 peer:InputPeer giveaway_id:long purpose:
payments.getStarsTopupOptions#c00ec7d3 = Vector<StarsTopupOption>;
payments.getStarsStatus#104fcfa7 peer:InputPeer = payments.StarsStatus;
payments.getStarsTransactions#69da4557 flags:# inbound:flags.0?true outbound:flags.1?true ascending:flags.2?true subscription_id:flags.3?string peer:InputPeer offset:string limit:int = payments.StarsStatus;
payments.sendStarsForm#2bb731d flags:# form_id:long invoice:InputInvoice = payments.PaymentResult;
payments.sendStarsForm#7998c914 form_id:long invoice:InputInvoice = payments.PaymentResult;
payments.refundStarsCharge#25ae8f4a user_id:InputUser charge_id:string = Updates;
payments.getStarsRevenueStats#d91ffad6 flags:# dark:flags.0?true peer:InputPeer = payments.StarsRevenueStats;
payments.getStarsRevenueWithdrawalUrl#13bbe8b3 peer:InputPeer stars:long password:InputCheckPasswordSRP = payments.StarsRevenueWithdrawalUrl;
@ -2424,6 +2442,10 @@ payments.getStarsSubscriptions#32512c5 flags:# missing_balance:flags.0?true peer
payments.changeStarsSubscription#c7770878 flags:# peer:InputPeer subscription_id:string canceled:flags.0?Bool = Bool;
payments.fulfillStarsSubscription#cc5bebb3 peer:InputPeer subscription_id:string = Bool;
payments.getStarsGiveawayOptions#bd1efd3e = Vector<StarsGiveawayOption>;
payments.getStarGifts#c4563590 hash:int = payments.StarGifts;
payments.getUserStarGifts#5e72c7e1 user_id:InputUser offset:string limit:int = payments.UserStarGifts;
payments.saveStarGift#87acf08e flags:# unsave:flags.0?true user_id:InputUser msg_id:int = Bool;
payments.convertStarGift#421e027 user_id:InputUser msg_id:int = Bool;
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector<InputStickerSetItem> software:flags.3?string = messages.StickerSet;
stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet;
@ -2515,7 +2537,7 @@ stories.incrementStoryViews#b2028afb peer:InputPeer id:Vector<int> = Bool;
stories.getStoryViewsList#7ed23c57 flags:# just_contacts:flags.0?true reactions_first:flags.2?true forwards_first:flags.3?true peer:InputPeer q:flags.1?string id:int offset:string limit:int = stories.StoryViewsList;
stories.getStoriesViews#28e16cc8 peer:InputPeer id:Vector<int> = stories.StoryViews;
stories.exportStoryLink#7b8def20 peer:InputPeer id:int = ExportedStoryLink;
stories.report#1923fa8c peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool;
stories.report#19d8eb45 peer:InputPeer id:Vector<int> option:bytes message:string = ReportResult;
stories.activateStealthMode#57bbd166 flags:# past:flags.0?true future:flags.1?true = Updates;
stories.sendReaction#7fd736b2 flags:# add_to_recent:flags.0?true peer:InputPeer story_id:int reaction:Reaction = Updates;
stories.getPeerStories#2c4ada50 peer:InputPeer = stories.PeerStories;
@ -2541,4 +2563,4 @@ smsjobs.getStatus#10a698e8 = smsjobs.Status;
smsjobs.getSmsJob#778d902f job_id:string = SmsJob;
smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;

View File

@ -127,7 +127,6 @@ export interface ISettings extends NotifySettings, Record<string, any> {
translationLanguage?: string;
doNotTranslate: string[];
canDisplayChatInTitle: boolean;
shouldShowLoginCodeInChatList?: boolean;
shouldForceHttpTransport?: boolean;
shouldAllowHttpTransport?: boolean;
shouldCollectDebugLogs?: boolean;