This commit is contained in:
zubiden 2025-11-06 11:36:26 +01:00 committed by Alexander Zinchuk
parent 310eaf6812
commit 2a483f554e
47 changed files with 1305 additions and 674 deletions

View File

@ -20,7 +20,6 @@ import type {
ApiSponsoredMessageReportResult, ApiSponsoredMessageReportResult,
ApiSponsoredPeer, ApiSponsoredPeer,
ApiStarsSubscriptionPricing, ApiStarsSubscriptionPricing,
ApiTopic,
} from '../../types'; } from '../../types';
import { pickTruthy } from '../../../util/iteratees'; import { pickTruthy } from '../../../util/iteratees';
@ -38,7 +37,6 @@ import {
buildApiEmojiStatus, buildApiEmojiStatus,
buildApiPeerColor, buildApiPeerColor,
buildApiPeerId, buildApiPeerId,
buildApiPeerNotifySettings,
buildAvatarPhotoId, buildAvatarPhotoId,
getApiChatIdFromMtpPeer, getApiChatIdFromMtpPeer,
isMtpPeerChat, isMtpPeerChat,
@ -552,50 +550,6 @@ export function buildApiSendAsPeerId(sendAs: GramJs.SendAsPeer): ApiSendAsPeerId
}; };
} }
export function buildApiTopic(forumTopic: GramJs.TypeForumTopic): ApiTopic | undefined {
if (forumTopic instanceof GramJs.ForumTopicDeleted) {
return undefined;
}
const {
id,
my,
closed,
pinned,
hidden,
short,
date,
title,
iconColor,
iconEmojiId,
topMessage,
unreadCount,
unreadMentionsCount,
unreadReactionsCount,
fromId,
notifySettings,
} = forumTopic;
return {
id,
isClosed: closed,
isPinned: pinned,
isHidden: hidden,
isOwner: my,
isMin: short,
date,
title,
iconColor,
iconEmojiId: iconEmojiId?.toString(),
lastMessageId: topMessage,
unreadCount,
unreadMentionsCount,
unreadReactionsCount,
fromId: getApiChatIdFromMtpPeer(fromId),
notifySettings: buildApiPeerNotifySettings(notifySettings),
};
}
export function buildApiChatlistInvite( export function buildApiChatlistInvite(
invite: GramJs.chatlists.TypeChatlistInvite | undefined, slug: string, invite: GramJs.chatlists.TypeChatlistInvite | undefined, slug: string,
): ApiChatlistInvite | undefined { ): ApiChatlistInvite | undefined {

View File

@ -0,0 +1,51 @@
import { Api as GramJs } from '../../../lib/gramjs';
import type { ApiTopic } from '../../types';
import { buildApiPeerNotifySettings, getApiChatIdFromMtpPeer } from './peers';
export function buildApiTopic(forumTopic: GramJs.TypeForumTopic): ApiTopic | undefined {
if (forumTopic instanceof GramJs.ForumTopicDeleted) {
return undefined;
}
const {
id,
my,
closed,
pinned,
hidden,
short,
date,
title,
iconColor,
iconEmojiId,
topMessage,
unreadCount,
unreadMentionsCount,
unreadReactionsCount,
fromId,
notifySettings,
titleMissing,
} = forumTopic;
return {
id,
isClosed: closed,
isPinned: pinned,
isHidden: hidden,
isOwner: my,
isMin: short,
date,
title,
iconColor,
iconEmojiId: iconEmojiId?.toString(),
lastMessageId: topMessage,
unreadCount,
unreadMentionsCount,
unreadReactionsCount,
fromId: getApiChatIdFromMtpPeer(fromId),
notifySettings: buildApiPeerNotifySettings(notifySettings),
isTitleMissing: titleMissing,
};
}

View File

@ -3,11 +3,11 @@ import { Api as GramJs } from '../../../lib/gramjs';
import type { import type {
ApiBotVerification, ApiBotVerification,
ApiEmojiStatusType, ApiEmojiStatusType,
ApiPeerColor,
ApiPeerColors, ApiPeerColors,
ApiPeerNotifySettings, ApiPeerNotifySettings,
ApiPeerProfileColorSet, ApiPeerProfileColorSet,
ApiProfileTab, ApiProfileTab,
ApiTypePeerColor,
} from '../../types'; } from '../../types';
import { CHANNEL_ID_BASE } from '../../../config'; import { CHANNEL_ID_BASE } from '../../../config';
@ -50,12 +50,33 @@ export function getApiChatIdFromMtpPeer(peer: TypePeerOrInput) {
} }
} }
export function buildApiPeerColor(peerColor: GramJs.TypePeerColor): ApiPeerColor { export function buildApiPeerColor(peerColor: GramJs.TypePeerColor): ApiTypePeerColor | undefined {
const { color, backgroundEmojiId } = peerColor; if (peerColor instanceof GramJs.PeerColor) {
return { const { color, backgroundEmojiId } = peerColor;
color, return {
backgroundEmojiId: backgroundEmojiId?.toString(), type: 'regular',
}; color,
backgroundEmojiId: backgroundEmojiId?.toString(),
};
}
if (peerColor instanceof GramJs.PeerColorCollectible) {
const {
collectibleId, giftEmojiId, backgroundEmojiId, accentColor, colors, darkAccentColor, darkColors,
} = peerColor;
return {
type: 'collectible',
giftEmojiId: giftEmojiId.toString(),
collectibleId: collectibleId.toString(),
backgroundEmojiId: backgroundEmojiId.toString(),
accentColor: int2hex(accentColor),
colors: colors.map((color) => int2hex(color)),
darkAccentColor: darkAccentColor ? int2hex(darkAccentColor) : undefined,
darkColors: darkColors?.map((color) => int2hex(color)),
};
}
return undefined;
} }
function buildApiPeerColorSet(colorSet: GramJs.help.PeerColorSet) { function buildApiPeerColorSet(colorSet: GramJs.help.PeerColorSet) {

View File

@ -1,6 +1,5 @@
import { Api as GramJs } from '../../../lib/gramjs'; import { Api as GramJs } from '../../../lib/gramjs';
import { RPCError } from '../../../lib/gramjs/errors'; import { RPCError } from '../../../lib/gramjs/errors';
import { generateRandomBigInt } from '../../../lib/gramjs/Helpers';
import type { ChatListType } from '../../../types'; import type { ChatListType } from '../../../types';
import type { import type {
@ -18,7 +17,6 @@ import type {
ApiPeerNotifySettings, ApiPeerNotifySettings,
ApiPhoto, ApiPhoto,
ApiProfileTab, ApiProfileTab,
ApiTopic,
ApiUser, ApiUser,
ApiUserStatus, ApiUserStatus,
} from '../../types'; } from '../../types';
@ -27,10 +25,8 @@ import {
ALL_FOLDER_ID, ALL_FOLDER_ID,
ARCHIVED_FOLDER_ID, ARCHIVED_FOLDER_ID,
DEBUG, DEBUG,
GENERAL_TOPIC_ID,
MEMBERS_LOAD_SLICE, MEMBERS_LOAD_SLICE,
SERVICE_NOTIFICATIONS_USER_ID, SERVICE_NOTIFICATIONS_USER_ID,
TOPICS_SLICE,
} from '../../../config'; } from '../../../config';
import { buildCollectionByKey, omitUndefined } from '../../../util/iteratees'; import { buildCollectionByKey, omitUndefined } from '../../../util/iteratees';
import { GLOBAL_SEARCH_CONTACTS_LIMIT } from '../../../limits'; import { GLOBAL_SEARCH_CONTACTS_LIMIT } from '../../../limits';
@ -47,7 +43,6 @@ import {
buildApiChatReactions, buildApiChatReactions,
buildApiMissingInvitedUser, buildApiMissingInvitedUser,
buildApiSponsoredPeer, buildApiSponsoredPeer,
buildApiTopic,
buildChatMember, buildChatMember,
buildChatMembers, buildChatMembers,
getPeerKey, getPeerKey,
@ -87,7 +82,7 @@ import { isChatFolder } from '../helpers/misc';
import { scheduleMutedChatUpdate } from '../scheduleUnmute'; import { scheduleMutedChatUpdate } from '../scheduleUnmute';
import { sendApiUpdate } from '../updates/apiUpdateEmitter'; import { sendApiUpdate } from '../updates/apiUpdateEmitter';
import { import {
applyState, processAffectedHistory, updateChannelState, applyState, updateChannelState,
} from '../updates/updateManager'; } from '../updates/updateManager';
import { handleGramJsUpdate, invokeRequest, uploadFile } from './client'; import { handleGramJsUpdate, invokeRequest, uploadFile } from './client';
@ -1699,186 +1694,6 @@ export function toggleForum({
}); });
} }
export async function createTopic({
chat, title, iconColor, iconEmojiId, sendAs,
}: {
chat: ApiChat;
title: string;
iconColor?: number;
iconEmojiId?: string;
sendAs?: ApiPeer;
}) {
const { id, accessHash } = chat;
const updates = await invokeRequest(new GramJs.channels.CreateForumTopic({
channel: buildInputChannel(id, accessHash),
title,
iconColor,
iconEmojiId: iconEmojiId ? BigInt(iconEmojiId) : undefined,
sendAs: sendAs ? buildInputPeer(sendAs.id, sendAs.accessHash) : undefined,
randomId: generateRandomBigInt(),
}));
if (!(updates instanceof GramJs.Updates) || !updates.updates.length) {
return undefined;
}
// Finding topic id in updates
return updates.updates?.find((update): update is GramJs.UpdateMessageID => (
update instanceof GramJs.UpdateMessageID
))?.id;
}
export async function fetchTopics({
chat, query, offsetTopicId, offsetId, offsetDate, limit = TOPICS_SLICE,
}: {
chat: ApiChat;
query?: string;
offsetTopicId?: number;
offsetId?: number;
offsetDate?: number;
limit?: number;
}): Promise<{
topics: ApiTopic[];
messages: ApiMessage[];
count: number;
shouldOrderByCreateDate?: boolean;
draftsById: Record<number, ReturnType<typeof buildMessageDraft>>;
readInboxMessageIdByTopicId: Record<number, number>;
} | undefined> {
const { id, accessHash } = chat;
const result = await invokeRequest(new GramJs.channels.GetForumTopics({
channel: buildInputChannel(id, accessHash),
limit,
q: query,
offsetTopic: offsetTopicId ?? DEFAULT_PRIMITIVES.INT,
offsetId: offsetId ?? DEFAULT_PRIMITIVES.INT,
offsetDate: offsetDate ?? DEFAULT_PRIMITIVES.INT,
}));
if (!result) return undefined;
const { count, orderByCreateDate } = result;
const topics = result.topics.map(buildApiTopic).filter(Boolean);
const messages = result.messages.map(buildApiMessage).filter(Boolean);
const draftsById = result.topics.reduce((acc, topic) => {
if (topic instanceof GramJs.ForumTopic && topic.draft) {
acc[topic.id] = buildMessageDraft(topic.draft);
}
return acc;
}, {} as Record<number, ReturnType<typeof buildMessageDraft>>);
const readInboxMessageIdByTopicId = result.topics.reduce((acc, topic) => {
if (topic instanceof GramJs.ForumTopic && topic.readInboxMaxId) {
acc[topic.id] = topic.readInboxMaxId;
}
return acc;
}, {} as Record<number, number>);
return {
topics,
messages,
// Include general topic
count: count + 1,
shouldOrderByCreateDate: orderByCreateDate,
draftsById,
readInboxMessageIdByTopicId,
};
}
export async function fetchTopicById({
chat, topicId,
}: {
chat: ApiChat;
topicId: number;
}): Promise<{
topic: ApiTopic;
messages: ApiMessage[];
} | undefined> {
const { id, accessHash } = chat;
const result = await invokeRequest(new GramJs.channels.GetForumTopicsByID({
channel: buildInputChannel(id, accessHash),
topics: [topicId],
}));
if (!result?.topics.length || !(result.topics[0] instanceof GramJs.ForumTopic)) {
return undefined;
}
const messages = result.messages.map(buildApiMessage).filter(Boolean);
return {
topic: buildApiTopic(result.topics[0])!,
messages,
};
}
export async function deleteTopic({
chat, topicId,
}: {
chat: ApiChat;
topicId: number;
}) {
const { id, accessHash } = chat;
const result = await invokeRequest(new GramJs.channels.DeleteTopicHistory({
channel: buildInputChannel(id, accessHash),
topMsgId: topicId,
}));
if (!result) return;
processAffectedHistory(chat, result);
if (result.offset) {
await deleteTopic({ chat, topicId });
}
}
export function togglePinnedTopic({
chat, topicId, isPinned,
}: {
chat: ApiChat;
topicId: number;
isPinned: boolean;
}) {
const { id, accessHash } = chat;
return invokeRequest(new GramJs.channels.UpdatePinnedForumTopic({
channel: buildInputChannel(id, accessHash),
topicId,
pinned: isPinned,
}), {
shouldReturnTrue: true,
});
}
export function editTopic({
chat, topicId, title, iconEmojiId, isClosed, isHidden,
}: {
chat: ApiChat;
topicId: number;
title?: string;
iconEmojiId?: string;
isClosed?: boolean;
isHidden?: boolean;
}) {
const { id, accessHash } = chat;
return invokeRequest(new GramJs.channels.EditForumTopic({
channel: buildInputChannel(id, accessHash),
topicId,
title,
iconEmojiId: topicId !== GENERAL_TOPIC_ID && iconEmojiId ? BigInt(iconEmojiId) : undefined,
closed: isClosed,
hidden: isHidden,
}), {
shouldReturnTrue: true,
});
}
export async function checkChatlistInvite({ export async function checkChatlistInvite({
slug, slug,
}: { }: {

View File

@ -466,7 +466,7 @@ function dispatchNotSupportedInFrozenAccountUpdate<T extends GramJs.AnyRequest>(
|| request instanceof GramJs.phone.GetGroupParticipants || request instanceof GramJs.phone.GetGroupParticipants
|| request instanceof GramJs.channels.GetParticipant || request instanceof GramJs.channels.GetParticipant
|| request instanceof GramJs.channels.GetParticipants || request instanceof GramJs.channels.GetParticipants
|| request instanceof GramJs.channels.GetForumTopics) { || request instanceof GramJs.messages.GetForumTopics) {
return; return;
} }

View File

@ -0,0 +1,196 @@
import { Api as GramJs } from '../../../lib/gramjs';
import { generateRandomBigInt } from '../../../lib/gramjs/Helpers';
import type { ApiMessage, ApiTopic } from '../../types';
import type {
ApiChat,
ApiDraft,
ApiPeer,
} from '../../types/chats';
import { GENERAL_TOPIC_ID, TOPICS_SLICE } from '../../../config';
import { buildApiTopic } from '../apiBuilders/forums';
import { buildApiMessage, buildMessageDraft } from '../apiBuilders/messages';
import { buildInputPeer, DEFAULT_PRIMITIVES } from '../gramjsBuilders';
import { processAffectedHistory } from '../updates/updateManager';
import { invokeRequest } from './client';
export async function createTopic({
chat, title, iconColor, iconEmojiId, sendAs,
}: {
chat: ApiChat;
title: string;
iconColor?: number;
iconEmojiId?: string;
sendAs?: ApiPeer;
}) {
const { id, accessHash } = chat;
const updates = await invokeRequest(new GramJs.messages.CreateForumTopic({
peer: buildInputPeer(id, accessHash),
title,
iconColor,
iconEmojiId: iconEmojiId ? BigInt(iconEmojiId) : undefined,
sendAs: sendAs ? buildInputPeer(sendAs.id, sendAs.accessHash) : undefined,
randomId: generateRandomBigInt(),
}));
if (!(updates instanceof GramJs.Updates) || !updates.updates.length) {
return undefined;
}
// Finding topic id in updates
return updates.updates?.find((update): update is GramJs.UpdateMessageID => (
update instanceof GramJs.UpdateMessageID
))?.id;
}
export async function fetchTopics({
chat, query, offsetTopicId, offsetId, offsetDate, limit = TOPICS_SLICE,
}: {
chat: ApiChat;
query?: string;
offsetTopicId?: number;
offsetId?: number;
offsetDate?: number;
limit?: number;
}): Promise<{
topics: ApiTopic[];
messages: ApiMessage[];
count: number;
shouldOrderByCreateDate?: boolean;
draftsById: Record<number, ApiDraft | undefined>;
readInboxMessageIdByTopicId: Record<number, number>;
} | undefined> {
const { id, accessHash } = chat;
const result = await invokeRequest(new GramJs.messages.GetForumTopics({
peer: buildInputPeer(id, accessHash),
limit,
q: query,
offsetTopic: offsetTopicId ?? DEFAULT_PRIMITIVES.INT,
offsetId: offsetId ?? DEFAULT_PRIMITIVES.INT,
offsetDate: offsetDate ?? DEFAULT_PRIMITIVES.INT,
}));
if (!result) return undefined;
const { count, orderByCreateDate } = result;
const topics = result.topics.map(buildApiTopic).filter(Boolean);
const messages = result.messages.map(buildApiMessage).filter(Boolean);
const draftsById = result.topics.reduce((acc, topic) => {
if (topic instanceof GramJs.ForumTopic && topic.draft) {
acc[topic.id] = buildMessageDraft(topic.draft);
}
return acc;
}, {} as Record<number, ReturnType<typeof buildMessageDraft>>);
const readInboxMessageIdByTopicId = result.topics.reduce((acc, topic) => {
if (topic instanceof GramJs.ForumTopic && topic.readInboxMaxId) {
acc[topic.id] = topic.readInboxMaxId;
}
return acc;
}, {} as Record<number, number>);
return {
topics,
messages,
// Include general topic
count: count + 1,
shouldOrderByCreateDate: orderByCreateDate,
draftsById,
readInboxMessageIdByTopicId,
};
}
export async function fetchTopicById({
chat, topicId,
}: {
chat: ApiChat;
topicId: number;
}): Promise<{
topic: ApiTopic;
messages: ApiMessage[];
} | undefined> {
const { id, accessHash } = chat;
const result = await invokeRequest(new GramJs.messages.GetForumTopicsByID({
peer: buildInputPeer(id, accessHash),
topics: [topicId],
}));
if (!result?.topics.length || !(result.topics[0] instanceof GramJs.ForumTopic)) {
return undefined;
}
const messages = result.messages.map(buildApiMessage).filter(Boolean);
return {
topic: buildApiTopic(result.topics[0])!,
messages,
};
}
export async function deleteTopic({
chat, topicId,
}: {
chat: ApiChat;
topicId: number;
}) {
const { id, accessHash } = chat;
const result = await invokeRequest(new GramJs.messages.DeleteTopicHistory({
peer: buildInputPeer(id, accessHash),
topMsgId: topicId,
}));
if (!result) return;
processAffectedHistory(chat, result);
if (result.offset) {
await deleteTopic({ chat, topicId });
}
}
export function togglePinnedTopic({
chat, topicId, isPinned,
}: {
chat: ApiChat;
topicId: number;
isPinned: boolean;
}) {
const { id, accessHash } = chat;
return invokeRequest(new GramJs.messages.UpdatePinnedForumTopic({
peer: buildInputPeer(id, accessHash),
topicId,
pinned: isPinned,
}), {
shouldReturnTrue: true,
});
}
export function editTopic({
chat, topicId, title, iconEmojiId, isClosed, isHidden,
}: {
chat: ApiChat;
topicId: number;
title?: string;
iconEmojiId?: string;
isClosed?: boolean;
isHidden?: boolean;
}) {
const { id, accessHash } = chat;
return invokeRequest(new GramJs.messages.EditForumTopic({
peer: buildInputPeer(id, accessHash),
topicId,
title,
iconEmojiId: topicId !== GENERAL_TOPIC_ID && iconEmojiId ? BigInt(iconEmojiId) : undefined,
closed: isClosed,
hidden: isHidden,
}), {
shouldReturnTrue: true,
});
}

View File

@ -44,3 +44,5 @@ export * from './payments';
export * from './fragment'; export * from './fragment';
export * from './stars'; export * from './stars';
export * from './forum';

View File

@ -1003,17 +1003,17 @@ export function updater(update: Update) {
}); });
} else if (update instanceof GramJs.UpdateConfig) { } else if (update instanceof GramJs.UpdateConfig) {
sendApiUpdate({ '@type': 'updateConfig' }); sendApiUpdate({ '@type': 'updateConfig' });
} else if (update instanceof GramJs.UpdateChannelPinnedTopic) { } else if (update instanceof GramJs.UpdatePinnedForumTopic) {
sendApiUpdate({ sendApiUpdate({
'@type': 'updatePinnedTopic', '@type': 'updatePinnedTopic',
chatId: buildApiPeerId(update.channelId, 'channel'), chatId: getApiChatIdFromMtpPeer(update.peer),
topicId: update.topicId, topicId: update.topicId,
isPinned: Boolean(update.pinned), isPinned: Boolean(update.pinned),
}); });
} else if (update instanceof GramJs.UpdateChannelPinnedTopics) { } else if (update instanceof GramJs.UpdatePinnedForumTopics) {
sendApiUpdate({ sendApiUpdate({
'@type': 'updatePinnedTopicsOrder', '@type': 'updatePinnedTopicsOrder',
chatId: buildApiPeerId(update.channelId, 'channel'), chatId: getApiChatIdFromMtpPeer(update.peer),
order: update.order || [], order: update.order || [],
}); });
} else if (update instanceof GramJs.UpdateRecentEmojiStatuses) { } else if (update instanceof GramJs.UpdateRecentEmojiStatuses) {

View File

@ -2,14 +2,14 @@ import type { ApiBotCommand } from './bots';
import type { import type {
ApiChatReactions, ApiFormattedText, ApiInputMessageReplyInfo, ApiInputSuggestedPostInfo, ApiPhoto, ApiStickerSet, ApiChatReactions, ApiFormattedText, ApiInputMessageReplyInfo, ApiInputSuggestedPostInfo, ApiPhoto, ApiStickerSet,
} from './messages'; } from './messages';
import type { ApiChatInviteImporter, ApiPeerNotifySettings, ApiRestrictionReason } from './misc'; import type { ApiChatInviteImporter, ApiRestrictionReason } from './misc';
import type { import type {
ApiBotVerification, ApiBotVerification,
ApiEmojiStatusType, ApiEmojiStatusType,
ApiFakeType, ApiFakeType,
ApiPeerColor,
ApiProfileTab, ApiProfileTab,
ApiSendAsPeerId, ApiSendAsPeerId,
ApiTypePeerColor,
} from './peers'; } from './peers';
import type { import type {
ApiUser, ApiUsername, ApiUser, ApiUsername,
@ -51,8 +51,8 @@ export interface ApiChat {
draftDate?: number; draftDate?: number;
isProtected?: boolean; isProtected?: boolean;
fakeType?: ApiFakeType; fakeType?: ApiFakeType;
color?: ApiPeerColor; color?: ApiTypePeerColor;
profileColor?: ApiPeerColor; profileColor?: ApiTypePeerColor;
emojiStatus?: ApiEmojiStatusType; emojiStatus?: ApiEmojiStatusType;
isForum?: boolean; isForum?: boolean;
isForumAsMessages?: true; isForumAsMessages?: true;
@ -244,27 +244,6 @@ export interface ApiChatFolder {
hasMyInvites?: true; hasMyInvites?: true;
} }
export interface ApiTopic {
id: number;
isClosed?: boolean;
isPinned?: boolean;
isHidden?: boolean;
isOwner?: boolean;
// TODO[forums] https://github.com/telegramdesktop/tdesktop/blob/1aece79a471d99a8b63d826b1bce1f36a04d7293/Telegram/SourceFiles/data/data_forum_topic.cpp#L318
isMin?: boolean;
date: number;
title: string;
iconColor: number;
iconEmojiId?: string;
lastMessageId: number;
unreadCount: number;
unreadMentionsCount: number;
unreadReactionsCount: number;
fromId: string;
notifySettings: ApiPeerNotifySettings;
}
export interface ApiChatlistInviteNew { export interface ApiChatlistInviteNew {
title: ApiFormattedText; title: ApiFormattedText;
noTitleAnimations?: true; noTitleAnimations?: true;

View File

@ -5,11 +5,11 @@ import type {
ApiWebDocument, ApiWebDocument,
} from './bots'; } from './bots';
import type { ApiMessageAction } from './messageActions'; import type { ApiMessageAction } from './messageActions';
import type { ApiRestrictionReason } from './misc'; import type { ApiPeerNotifySettings, ApiRestrictionReason } from './misc';
import type { import type {
ApiLabeledPrice, ApiLabeledPrice,
} from './payments'; } from './payments';
import type { ApiPeerColor } from './peers'; import type { ApiTypePeerColor } from './peers';
import type { ApiStarGiftUnique, ApiTypeCurrencyAmount } from './stars'; import type { ApiStarGiftUnique, ApiTypeCurrencyAmount } from './stars';
import type { import type {
ApiMessageStoryData, ApiStory, ApiWebPageStickerData, ApiWebPageStoryData, ApiMessageStoryData, ApiStory, ApiWebPageStickerData, ApiWebPageStoryData,
@ -851,7 +851,7 @@ export type ApiSponsoredMessage = {
url: string; url: string;
photo?: ApiPhoto; photo?: ApiPhoto;
content: MediaContent; content: MediaContent;
peerColor?: ApiPeerColor; peerColor?: ApiTypePeerColor;
}; };
// KeyboardButtons // KeyboardButtons
@ -1049,6 +1049,28 @@ export type LinkContext = {
messageId: number; messageId: number;
}; };
export interface ApiTopic {
id: number;
isClosed?: boolean;
isPinned?: boolean;
isHidden?: boolean;
isOwner?: boolean;
// TODO[forums] https://github.com/telegramdesktop/tdesktop/blob/1aece79a471d99a8b63d826b1bce1f36a04d7293/Telegram/SourceFiles/data/data_forum_topic.cpp#L318
isMin?: boolean;
date: number;
title: string;
iconColor: number;
iconEmojiId?: string;
lastMessageId: number;
unreadCount: number;
unreadMentionsCount: number;
unreadReactionsCount: number;
fromId: string;
notifySettings: ApiPeerNotifySettings;
isTitleMissing?: boolean;
}
export const MAIN_THREAD_ID = -1; export const MAIN_THREAD_ID = -1;
// `Symbol` can not be transferred from worker // `Symbol` can not be transferred from worker

View File

@ -57,10 +57,24 @@ export interface ApiSendAsPeerId {
} }
export interface ApiPeerColor { export interface ApiPeerColor {
type: 'regular';
color?: number; color?: number;
backgroundEmojiId?: string; backgroundEmojiId?: string;
} }
export interface ApiPeerColorCollectible {
type: 'collectible';
collectibleId: string;
giftEmojiId: string;
backgroundEmojiId: string;
accentColor: string;
colors: string[];
darkAccentColor?: string;
darkColors?: string[];
}
export type ApiTypePeerColor = ApiPeerColor | ApiPeerColorCollectible;
export type ApiPeerColorSet = string[]; export type ApiPeerColorSet = string[];
export type ApiPeerProfileColorSet = { export type ApiPeerProfileColorSet = {
paletteColors: string[]; paletteColors: string[];

View File

@ -6,9 +6,9 @@ import type {
ApiBotVerification, ApiBotVerification,
ApiEmojiStatusType, ApiEmojiStatusType,
ApiFakeType, ApiFakeType,
ApiPeerColor,
ApiPeerSettings, ApiPeerSettings,
ApiProfileTab, ApiProfileTab,
ApiTypePeerColor,
} from './peers'; } from './peers';
import type { ApiSavedStarGift, ApiStarsRating } from './stars'; import type { ApiSavedStarGift, ApiStarsRating } from './stars';
@ -40,8 +40,8 @@ export interface ApiUser {
hasStories?: boolean; hasStories?: boolean;
hasUnreadStories?: boolean; hasUnreadStories?: boolean;
maxStoryId?: number; maxStoryId?: number;
color?: ApiPeerColor; color?: ApiTypePeerColor;
profileColor?: ApiPeerColor; profileColor?: ApiTypePeerColor;
canEditBot?: boolean; canEditBot?: boolean;
hasMainMiniApp?: boolean; hasMainMiniApp?: boolean;
botActiveUsers?: number; botActiveUsers?: number;

View File

@ -1,6 +1,5 @@
import type { MouseEvent as ReactMouseEvent } from 'react'; import type { MouseEvent as ReactMouseEvent } from 'react';
import type { FC, TeactNode } from '../../lib/teact/teact'; import type { TeactNode } from '../../lib/teact/teact';
import type React from '../../lib/teact/teact';
import { memo, useMemo, useRef } from '../../lib/teact/teact'; import { memo, useMemo, useRef } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';
@ -15,6 +14,7 @@ import { IS_TEST } from '../../config';
import { import {
getChatAvatarHash, getChatAvatarHash,
getChatTitle, getChatTitle,
getPeerColorKey,
getPeerStoryHtmlId, getPeerStoryHtmlId,
getUserFullName, getUserFullName,
getVideoProfilePhotoMediaHash, getVideoProfilePhotoMediaHash,
@ -29,7 +29,6 @@ import buildStyle from '../../util/buildStyle';
import { isUserId } from '../../util/entities/ids'; import { isUserId } from '../../util/entities/ids';
import { getFirstLetters } from '../../util/textFormat'; import { getFirstLetters } from '../../util/textFormat';
import { REM } from './helpers/mediaDimensions'; import { REM } from './helpers/mediaDimensions';
import { getPeerColorClass } from './helpers/peerColor';
import renderText from './helpers/renderText'; import renderText from './helpers/renderText';
import { useFastClick } from '../../hooks/useFastClick'; import { useFastClick } from '../../hooks/useFastClick';
@ -37,6 +36,7 @@ import useLastCallback from '../../hooks/useLastCallback';
import useMedia from '../../hooks/useMedia'; import useMedia from '../../hooks/useMedia';
import useMediaTransition from '../../hooks/useMediaTransition'; import useMediaTransition from '../../hooks/useMediaTransition';
import useOldLang from '../../hooks/useOldLang'; import useOldLang from '../../hooks/useOldLang';
import { getPeerColorClass } from '../../hooks/usePeerColor';
import OptimizedVideo from '../ui/OptimizedVideo'; import OptimizedVideo from '../ui/OptimizedVideo';
import AvatarStoryCircle from './AvatarStoryCircle'; import AvatarStoryCircle from './AvatarStoryCircle';
@ -94,7 +94,7 @@ type OwnProps = {
onMouseMove?: (e: React.MouseEvent) => void; onMouseMove?: (e: React.MouseEvent) => void;
}; };
const Avatar: FC<OwnProps> = ({ const Avatar = ({
className, className,
style, style,
size = 'large', size = 'large',
@ -121,7 +121,7 @@ const Avatar: FC<OwnProps> = ({
onClick, onClick,
onContextMenu, onContextMenu,
onMouseMove, onMouseMove,
}) => { }: OwnProps) => {
const { openStoryViewer } = getActions(); const { openStoryViewer } = getActions();
const ref = useRef<HTMLDivElement>(); const ref = useRef<HTMLDivElement>();
@ -135,6 +135,9 @@ const Avatar: FC<OwnProps> = ({
const isAnonymousForwards = realPeer && isAnonymousForwardsChat(realPeer.id); const isAnonymousForwards = realPeer && isAnonymousForwardsChat(realPeer.id);
const isForum = chat?.isForum; const isForum = chat?.isForum;
const peerColorKey = getPeerColorKey(peer);
const peerColorClass = peerColorKey !== undefined ? getPeerColorClass(peerColorKey) : undefined;
const isStoryClickable = withStory && storyViewerMode !== 'disabled' && realPeer?.hasStories; const isStoryClickable = withStory && storyViewerMode !== 'disabled' && realPeer?.hasStories;
let imageHash: string | undefined; let imageHash: string | undefined;
@ -265,7 +268,7 @@ const Avatar: FC<OwnProps> = ({
const fullClassName = buildClassName( const fullClassName = buildClassName(
'Avatar', 'Avatar',
className, className,
getPeerColorClass(peer), peerColorClass,
!peer && text && 'hidden-user', !peer && text && 'hidden-user',
isSavedMessages && 'saved-messages', isSavedMessages && 'saved-messages',
isAnonymousForwards && 'anonymous-forwards', isAnonymousForwards && 'anonymous-forwards',
@ -283,6 +286,12 @@ const Avatar: FC<OwnProps> = ({
(!isSavedMessages && !imgUrl) && 'no-photo', (!isSavedMessages && !imgUrl) && 'no-photo',
); );
const fullStyle = buildStyle(
`--_size: ${pxSize}px;`,
customColor && `--color-user: ${customColor}`,
style,
);
const hasMedia = Boolean(isSavedMessages || imgUrl); const hasMedia = Boolean(isSavedMessages || imgUrl);
const { handleClick, handleMouseDown } = useFastClick((e: ReactMouseEvent<HTMLDivElement, MouseEvent>) => { const { handleClick, handleMouseDown } = useFastClick((e: ReactMouseEvent<HTMLDivElement, MouseEvent>) => {
@ -310,7 +319,7 @@ const Avatar: FC<OwnProps> = ({
data-peer-id={realPeer?.id} data-peer-id={realPeer?.id}
data-test-sender-id={IS_TEST ? realPeer?.id : undefined} data-test-sender-id={IS_TEST ? realPeer?.id : undefined}
aria-label={typeof content === 'string' ? author : undefined} aria-label={typeof content === 'string' ? author : undefined}
style={buildStyle(`--_size: ${pxSize}px;`, customColor && `--color-user: ${customColor}`, style)} style={fullStyle}
onClick={handleClick} onClick={handleClick}
onContextMenu={onContextMenu} onContextMenu={onContextMenu}
onMouseDown={handleMouseDown} onMouseDown={handleMouseDown}

View File

@ -127,7 +127,6 @@ import applyIosAutoCapitalizationFix from '../middle/composer/helpers/applyIosAu
import buildAttachment, { prepareAttachmentsToSend } from '../middle/composer/helpers/buildAttachment'; import buildAttachment, { prepareAttachmentsToSend } from '../middle/composer/helpers/buildAttachment';
import { buildCustomEmojiHtml } from '../middle/composer/helpers/customEmoji'; import { buildCustomEmojiHtml } from '../middle/composer/helpers/customEmoji';
import { isSelectionInsideInput } from '../middle/composer/helpers/selection'; import { isSelectionInsideInput } from '../middle/composer/helpers/selection';
import { getPeerColorClass } from './helpers/peerColor';
import renderText from './helpers/renderText'; import renderText from './helpers/renderText';
import { getTextWithEntitiesAsHtml } from './helpers/renderTextWithEntities'; import { getTextWithEntitiesAsHtml } from './helpers/renderTextWithEntities';
@ -141,6 +140,7 @@ import useGetSelectionRange from '../../hooks/useGetSelectionRange';
import useLang from '../../hooks/useLang'; import useLang from '../../hooks/useLang';
import useLastCallback from '../../hooks/useLastCallback'; import useLastCallback from '../../hooks/useLastCallback';
import useOldLang from '../../hooks/useOldLang'; import useOldLang from '../../hooks/useOldLang';
import usePeerColor from '../../hooks/usePeerColor';
import usePrevious from '../../hooks/usePrevious'; import usePrevious from '../../hooks/usePrevious';
import usePreviousDeprecated from '../../hooks/usePreviousDeprecated'; import usePreviousDeprecated from '../../hooks/usePreviousDeprecated';
import useSchedule from '../../hooks/useSchedule'; import useSchedule from '../../hooks/useSchedule';
@ -981,6 +981,11 @@ const Composer: FC<OwnProps & StateProps> = ({
} }
}, [chatId, handleStoryPickerContextMenuHide, isReactionPickerOpen, storyId, storyReactionPickerAnchor]); }, [chatId, handleStoryPickerContextMenuHide, isReactionPickerOpen, storyId, storyReactionPickerAnchor]);
const { className: peerColorClass, style: peerColorStyle } = usePeerColor({
peer: sendAsPeer || currentUser,
theme,
});
useClipboardPaste( useClipboardPaste(
isForCurrentMessageList || isInStoryViewer, isForCurrentMessageList || isInStoryViewer,
insertFormattedTextAndUpdateCursor, insertFormattedTextAndUpdateCursor,
@ -2082,7 +2087,7 @@ const Composer: FC<OwnProps & StateProps> = ({
/> />
</> </>
)} )}
<div className={buildClassName('message-input-wrapper', getPeerColorClass(currentUser))}> <div className={buildClassName('message-input-wrapper', peerColorClass)} style={peerColorStyle}>
{isInMessageList && ( {isInMessageList && (
<> <>
{withBotMenuButton && ( {withBotMenuButton && (

View File

@ -3,15 +3,16 @@ import { memo } from '../../lib/teact/teact';
import { withGlobal } from '../../global'; import { withGlobal } from '../../global';
import type { ApiPeer } from '../../api/types'; import type { ApiPeer } from '../../api/types';
import type { CustomPeer } from '../../types'; import type { CustomPeer, ThemeKey } from '../../types';
import type { IconName } from '../../types/icons'; import type { IconName } from '../../types/icons';
import { getPeerTitle, isApiPeerChat } from '../../global/helpers/peers'; import { getPeerTitle, isApiPeerChat } from '../../global/helpers/peers';
import { selectPeer, selectUser } from '../../global/selectors'; import { selectPeer, selectTheme, selectUser } from '../../global/selectors';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';
import { getPeerColorClass } from './helpers/peerColor'; import buildStyle from '../../util/buildStyle';
import useOldLang from '../../hooks/useOldLang'; import useLang from '../../hooks/useLang';
import usePeerColor from '../../hooks/usePeerColor';
import Avatar from './Avatar'; import Avatar from './Avatar';
import FullNameTitle from './FullNameTitle'; import FullNameTitle from './FullNameTitle';
@ -41,6 +42,7 @@ type OwnProps<T = undefined> = {
type StateProps = { type StateProps = {
peer?: ApiPeer; peer?: ApiPeer;
theme: ThemeKey;
isSavedMessages?: boolean; isSavedMessages?: boolean;
}; };
@ -58,14 +60,20 @@ const PeerChip = <T,>({
isSavedMessages, isSavedMessages,
withPeerColors, withPeerColors,
withEmojiStatus, withEmojiStatus,
onClick,
itemClassName, itemClassName,
theme,
onClick,
}: OwnProps<T> & StateProps) => { }: OwnProps<T> & StateProps) => {
const lang = useOldLang(); const lang = useLang();
const apiPeer = mockPeer || peer; const apiPeer = mockPeer || peer;
const anyPeer = customPeer || apiPeer; const anyPeer = customPeer || apiPeer;
const { className: peerColorClass, style: peerColorStyle } = usePeerColor({
peer: anyPeer,
theme,
});
const chat = apiPeer && isApiPeerChat(apiPeer) ? apiPeer : undefined; const chat = apiPeer && isApiPeerChat(apiPeer) ? apiPeer : undefined;
let iconElement: TeactNode | undefined; let iconElement: TeactNode | undefined;
@ -103,13 +111,18 @@ const PeerChip = <T,>({
canClose && styles.closeable, canClose && styles.closeable,
isCloseNonDestructive && styles.nonDestructive, isCloseNonDestructive && styles.nonDestructive,
!onClick && styles.notClickable, !onClick && styles.notClickable,
withPeerColors && getPeerColorClass(customPeer || peer), withPeerColors && peerColorClass,
className, className,
); );
const style = buildStyle(
withPeerColors && peerColorStyle,
);
return ( return (
<div <div
className={fullClassName} className={fullClassName}
style={style}
onClick={() => onClick?.(clickArg!)} onClick={() => onClick?.(clickArg!)}
title={isMinimized ? titleText : undefined} title={isMinimized ? titleText : undefined}
dir={lang.isRtl ? 'rtl' : undefined} dir={lang.isRtl ? 'rtl' : undefined}
@ -131,10 +144,12 @@ const PeerChip = <T,>({
export default memo(withGlobal<OwnProps>( export default memo(withGlobal<OwnProps>(
(global, { peerId, forceShowSelf }): Complete<StateProps> => { (global, { peerId, forceShowSelf }): Complete<StateProps> => {
const theme = selectTheme(global);
if (!peerId) { if (!peerId) {
return { return {
peer: undefined, peer: undefined,
isSavedMessages: undefined, isSavedMessages: undefined,
theme,
}; };
} }
@ -145,6 +160,7 @@ export default memo(withGlobal<OwnProps>(
return { return {
peer, peer,
isSavedMessages, isSavedMessages,
theme,
}; };
}, },
)(PeerChip)) as typeof PeerChip; )(PeerChip)) as <T>(props: OwnProps<T>) => ReturnType<typeof PeerChip<T>>;

View File

@ -1,5 +1,4 @@
.root { .root {
--peer-color-wrapper-bar-color: var(--bar-gradient, var(--accent-color)); --peer-color-wrapper-bar-color: var(--bar-gradient, var(--accent-color));
position: relative; position: relative;
@ -13,19 +12,31 @@
color: var(--accent-color); color: var(--accent-color);
background-color: var(--accent-background-color); background-color: var(--accent-background-color);
}
&::before {
content: ""; .withBar::before {
content: "";
position: absolute;
top: 0; position: absolute;
bottom: 0; top: 0;
inset-inline-start: 0; bottom: 0;
inset-inline-start: 0;
display: block;
display: block;
width: 0.1875rem;
width: 0.1875rem;
background: var(--peer-color-wrapper-bar-color);
} background: var(--peer-color-wrapper-bar-color);
}
.hasGiftEmoji {
padding-inline-end: 1.75rem;
}
.giftEmoji {
--custom-emoji-size: 1.25rem;
position: absolute;
top: 0.25rem;
right: 0.25rem;
} }

View File

@ -2,11 +2,16 @@ import type { ElementRef } from '../../lib/teact/teact';
import type React from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import type { ApiPeer, ApiPeerColor } from '../../api/types'; import type { ApiPeer, ApiTypePeerColor } from '../../api/types';
import { selectTheme } from '../../global/selectors';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';
import { getApiPeerColorClass, getPeerColorClass } from './helpers/peerColor'; import { REM } from './helpers/mediaDimensions';
import useSelector from '../../hooks/data/useSelector';
import usePeerColor from '../../hooks/usePeerColor';
import CustomEmoji from './CustomEmoji';
import EmojiIconBackground from './embedded/EmojiIconBackground'; import EmojiIconBackground from './embedded/EmojiIconBackground';
import styles from './PeerColorWrapper.module.scss'; import styles from './PeerColorWrapper.module.scss';
@ -14,7 +19,9 @@ import styles from './PeerColorWrapper.module.scss';
interface OwnProps extends React.HTMLAttributes<HTMLDivElement> { interface OwnProps extends React.HTMLAttributes<HTMLDivElement> {
ref?: ElementRef<HTMLDivElement>; ref?: ElementRef<HTMLDivElement>;
peer?: ApiPeer; peer?: ApiPeer;
peerColor?: ApiPeerColor; peerColor?: ApiTypePeerColor;
isReply?: boolean;
noBar?: boolean;
noUserColors?: boolean; noUserColors?: boolean;
shouldReset?: boolean; shouldReset?: boolean;
className?: string; className?: string;
@ -22,29 +29,58 @@ interface OwnProps extends React.HTMLAttributes<HTMLDivElement> {
children: React.ReactNode; children: React.ReactNode;
} }
const GIFT_EMOJI_SIZE = 1.25 * REM;
function PeerColorWrapper({ function PeerColorWrapper({
peer, ref, peerColor, noUserColors, ref,
shouldReset, className, emojiIconClassName, peer,
children, ...otherProps peerColor,
isReply,
noBar,
noUserColors,
shouldReset,
className,
emojiIconClassName,
children,
...otherProps
}: OwnProps) { }: OwnProps) {
const color = peerColor || peer?.color; const color = peerColor || peer?.color;
const theme = useSelector(selectTheme);
const {
style,
className: peerColorClassName,
backgroundEmojiId,
giftEmojiId,
} = usePeerColor({ peer, color, noUserColors, shouldReset, theme });
const hasGiftEmoji = isReply && Boolean(giftEmojiId);
return ( return (
<div <div
ref={ref} ref={ref}
className={buildClassName( className={buildClassName(
styles.root, styles.root,
peer && getPeerColorClass(peer, noUserColors, shouldReset), peerColorClassName,
peerColor && getApiPeerColorClass(peerColor), hasGiftEmoji && styles.hasGiftEmoji,
!noBar && styles.withBar,
className, className,
)} )}
style={style}
{...otherProps} {...otherProps}
> >
{color?.backgroundEmojiId && ( {backgroundEmojiId && (
<EmojiIconBackground <EmojiIconBackground
className={emojiIconClassName} className={emojiIconClassName}
emojiDocumentId={color.backgroundEmojiId} emojiDocumentId={backgroundEmojiId}
withEmojiSpace={hasGiftEmoji}
/>
)}
{hasGiftEmoji && (
<CustomEmoji
className={styles.giftEmoji}
documentId={giftEmojiId}
size={GIFT_EMOJI_SIZE}
noPlay
/> />
)} )}
{children} {children}

View File

@ -305,6 +305,7 @@ const EmbeddedMessage: FC<OwnProps> = ({
emojiIconClassName="EmbeddedMessage--background-icons" emojiIconClassName="EmbeddedMessage--background-icons"
ref={ref} ref={ref}
shouldReset shouldReset
isReply={Boolean(replyInfo)}
noUserColors={noUserColors} noUserColors={noUserColors}
className={buildClassName( className={buildClassName(
'EmbeddedMessage', 'EmbeddedMessage',

View File

@ -1,4 +1,3 @@
import type { FC } from '../../../lib/teact/teact';
import { memo, useEffect, useRef } from '../../../lib/teact/teact'; import { memo, useEffect, useRef } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global'; import { getActions, withGlobal } from '../../../global';
@ -7,19 +6,20 @@ import type {
ApiStoryForwardInfo, ApiStoryForwardInfo,
ApiTypeStory, ApiTypeStory,
} from '../../../api/types'; } from '../../../api/types';
import type { ThemeKey } from '../../../types';
import type { IconName } from '../../../types/icons'; import type { IconName } from '../../../types/icons';
import { getPeerTitle } from '../../../global/helpers/peers'; import { getPeerTitle } from '../../../global/helpers/peers';
import { selectPeer, selectPeerStory } from '../../../global/selectors'; import { selectPeer, selectPeerStory, selectTheme } from '../../../global/selectors';
import buildClassName from '../../../util/buildClassName'; import buildClassName from '../../../util/buildClassName';
import { isUserId } from '../../../util/entities/ids'; import { isUserId } from '../../../util/entities/ids';
import { getPeerColorClass } from '../helpers/peerColor';
import renderText from '../helpers/renderText'; import renderText from '../helpers/renderText';
import { renderTextWithEntities } from '../helpers/renderTextWithEntities'; import { renderTextWithEntities } from '../helpers/renderTextWithEntities';
import { useFastClick } from '../../../hooks/useFastClick'; import { useFastClick } from '../../../hooks/useFastClick';
import useLastCallback from '../../../hooks/useLastCallback'; import useLastCallback from '../../../hooks/useLastCallback';
import useOldLang from '../../../hooks/useOldLang'; import useOldLang from '../../../hooks/useOldLang';
import usePeerColor from '../../../hooks/usePeerColor';
import Icon from '../icons/Icon'; import Icon from '../icons/Icon';
import PeerColorWrapper from '../PeerColorWrapper'; import PeerColorWrapper from '../PeerColorWrapper';
@ -35,14 +35,16 @@ type OwnProps = {
type StateProps = { type StateProps = {
sender?: ApiPeer; sender?: ApiPeer;
story?: ApiTypeStory; story?: ApiTypeStory;
theme: ThemeKey;
}; };
const EmbeddedStoryForward: FC<OwnProps & StateProps> = ({ const EmbeddedStoryForward = ({
className, className,
forwardInfo, forwardInfo,
sender, sender,
story, story,
}) => { theme,
}: OwnProps & StateProps) => {
const { openStoryViewer, loadPeerStoriesByIds, openChat } = getActions(); const { openStoryViewer, loadPeerStoriesByIds, openChat } = getActions();
const ref = useRef<HTMLDivElement>(); const ref = useRef<HTMLDivElement>();
@ -57,6 +59,13 @@ const EmbeddedStoryForward: FC<OwnProps & StateProps> = ({
} }
}, [forwardInfo, story]); }, [forwardInfo, story]);
const { className: peerColorClass, style: peerColorStyle } = usePeerColor({
peer: sender,
noUserColors: true,
shouldReset: true,
theme,
});
const senderTitle = sender ? getPeerTitle(lang, sender) : forwardInfo.fromName; const senderTitle = sender ? getPeerTitle(lang, sender) : forwardInfo.fromName;
const openOriginalStory = useLastCallback(() => { const openOriginalStory = useLastCallback(() => {
@ -111,8 +120,9 @@ const EmbeddedStoryForward: FC<OwnProps & StateProps> = ({
className={buildClassName( className={buildClassName(
'EmbeddedMessage', 'EmbeddedMessage',
className, className,
getPeerColorClass(sender, true, true), peerColorClass,
)} )}
style={peerColorStyle}
dir={lang.isRtl ? 'rtl' : undefined} dir={lang.isRtl ? 'rtl' : undefined}
onClick={handleClick} onClick={handleClick}
onMouseDown={handleMouseDown} onMouseDown={handleMouseDown}
@ -138,9 +148,11 @@ export default memo(withGlobal<OwnProps>(
const sender = forwardInfo.fromPeerId ? selectPeer(global, forwardInfo.fromPeerId) : undefined; const sender = forwardInfo.fromPeerId ? selectPeer(global, forwardInfo.fromPeerId) : undefined;
const story = forwardInfo.storyId && forwardInfo.fromPeerId const story = forwardInfo.storyId && forwardInfo.fromPeerId
? selectPeerStory(global, forwardInfo.fromPeerId, forwardInfo.storyId) : undefined; ? selectPeerStory(global, forwardInfo.fromPeerId, forwardInfo.storyId) : undefined;
return { return {
sender, sender,
story, story,
theme: selectTheme(global),
}; };
}, },
)(EmbeddedStoryForward)); )(EmbeddedStoryForward));

View File

@ -56,15 +56,18 @@ const ICON_POSITIONS: IconPosition[] = [
const EMOJI_SIZE = REM; const EMOJI_SIZE = REM;
const LOTTIE_TINT_OPACITY = 'ff'; const LOTTIE_TINT_OPACITY = 'ff';
const NON_LOTTIE_TINT_OPACITY = 'bb'; const NON_LOTTIE_TINT_OPACITY = 'bb';
const EMOJI_SPACE = 0.75 * REM;
type OwnProps = { type OwnProps = {
emojiDocumentId: string; emojiDocumentId: string;
className?: string; className?: string;
withEmojiSpace?: boolean;
}; };
const EmojiIconBackground = ({ const EmojiIconBackground = ({
emojiDocumentId, emojiDocumentId,
className, className,
withEmojiSpace,
}: OwnProps) => { }: OwnProps) => {
const canvasRef = useRef<HTMLCanvasElement>(); const canvasRef = useRef<HTMLCanvasElement>();
const containerRef = useRef<HTMLDivElement>(); const containerRef = useRef<HTMLDivElement>();
@ -102,7 +105,8 @@ const EmojiIconBackground = ({
ICON_POSITIONS.forEach(({ ICON_POSITIONS.forEach(({
inline, block, opacity, scale, inline, block, opacity, scale,
}) => { }) => {
const x = (lang.isRtl ? inline : width / dpr - inline) * dpr; const xShift = withEmojiSpace ? -EMOJI_SPACE : 0;
const x = ((lang.isRtl ? inline : width / dpr - inline) + xShift) * dpr;
const y = block * dpr; const y = block * dpr;
const emojiSize = EMOJI_SIZE * dpr; const emojiSize = EMOJI_SIZE * dpr;
@ -128,7 +132,7 @@ const EmojiIconBackground = ({
useEffect(() => { useEffect(() => {
updateCanvasAfterHeavyAnimation(); updateCanvasAfterHeavyAnimation();
}, [emojiImage, lang.isRtl, customColor, updateCanvasAfterHeavyAnimation]); }, [emojiImage, lang.isRtl, customColor, updateCanvasAfterHeavyAnimation, withEmojiSpace]);
const updateCanvasSize = useThrottleForHeavyAnimation((parentWidth: number, parentHeight: number) => { const updateCanvasSize = useThrottleForHeavyAnimation((parentWidth: number, parentHeight: number) => {
requestMutation(() => { requestMutation(() => {

View File

@ -1,21 +0,0 @@
import type { ApiPeer, ApiPeerColor } from '../../../api/types';
import type { CustomPeer } from '../../../types';
import { getPeerColorCount, getPeerColorKey } from '../../../global/helpers';
export function getPeerColorClass(peer?: ApiPeer | CustomPeer, noUserColors?: boolean, shouldReset?: boolean) {
if (!peer) {
if (!shouldReset) return undefined;
return noUserColors ? 'peer-color-count-1' : 'peer-color-0';
}
if ('isCustomPeer' in peer) {
if (peer.peerColorId === undefined) return undefined;
return `peer-color-${peer.peerColorId}`;
}
return noUserColors ? `peer-color-count-${getPeerColorCount(peer)}` : `peer-color-${getPeerColorKey(peer)}`;
}
export function getApiPeerColorClass(color: ApiPeerColor) {
return `peer-color-${color.color}`;
}

View File

@ -369,6 +369,7 @@ const ProfileInfo = ({
user={user} user={user}
chat={chat} chat={chat}
photo={photo} photo={photo}
theme={theme}
canPlayVideo={Boolean(isActive && canPlayVideo)} canPlayVideo={Boolean(isActive && canPlayVideo)}
className={buildClassName(isActive && styles.activeProfilePhoto)} className={buildClassName(isActive && styles.activeProfilePhoto)}
style={isActive ? createVtnStyle('avatar', true) : undefined} style={isActive ? createVtnStyle('avatar', true) : undefined}

View File

@ -1,9 +1,10 @@
import type { FC, TeactNode } from '../../../lib/teact/teact'; import type { TeactNode } from '../../../lib/teact/teact';
import { import {
memo, useEffect, useMemo, useRef, memo, useEffect, useMemo, useRef,
} from '../../../lib/teact/teact'; } from '../../../lib/teact/teact';
import type { ApiChat, ApiPhoto, ApiUser } from '../../../api/types'; import type { ApiChat, ApiPhoto, ApiUser } from '../../../api/types';
import type { ThemeKey } from '../../../types';
import { import {
getChatAvatarHash, getChatAvatarHash,
@ -18,9 +19,9 @@ import {
} from '../../../global/helpers'; } from '../../../global/helpers';
import { IS_CANVAS_FILTER_SUPPORTED } from '../../../util/browser/windowEnvironment'; import { IS_CANVAS_FILTER_SUPPORTED } from '../../../util/browser/windowEnvironment';
import buildClassName from '../../../util/buildClassName'; import buildClassName from '../../../util/buildClassName';
import buildStyle from '../../../util/buildStyle';
import { isUserId } from '../../../util/entities/ids'; import { isUserId } from '../../../util/entities/ids';
import { getFirstLetters } from '../../../util/textFormat'; import { getFirstLetters } from '../../../util/textFormat';
import { getPeerColorClass } from '../helpers/peerColor';
import renderText from '../helpers/renderText'; import renderText from '../helpers/renderText';
import useAppLayout from '../../../hooks/useAppLayout'; import useAppLayout from '../../../hooks/useAppLayout';
@ -29,6 +30,7 @@ import useFlag from '../../../hooks/useFlag';
import useLang from '../../../hooks/useLang'; import useLang from '../../../hooks/useLang';
import useMedia from '../../../hooks/useMedia'; import useMedia from '../../../hooks/useMedia';
import useMediaTransitionDeprecated from '../../../hooks/useMediaTransitionDeprecated'; import useMediaTransitionDeprecated from '../../../hooks/useMediaTransitionDeprecated';
import usePeerColor from '../../../hooks/usePeerColor';
import OptimizedVideo from '../../ui/OptimizedVideo'; import OptimizedVideo from '../../ui/OptimizedVideo';
import Spinner from '../../ui/Spinner'; import Spinner from '../../ui/Spinner';
@ -45,10 +47,11 @@ type OwnProps = {
canPlayVideo: boolean; canPlayVideo: boolean;
className?: string; className?: string;
style?: string; style?: string;
theme: ThemeKey;
onClick: NoneToVoidFunction; onClick: NoneToVoidFunction;
}; };
const ProfilePhoto: FC<OwnProps> = ({ const ProfilePhoto = ({
chat, chat,
user, user,
photo, photo,
@ -57,8 +60,9 @@ const ProfilePhoto: FC<OwnProps> = ({
canPlayVideo, canPlayVideo,
className, className,
style, style,
theme,
onClick, onClick,
}) => { }: OwnProps) => {
const videoRef = useRef<HTMLVideoElement>(); const videoRef = useRef<HTMLVideoElement>();
const lang = useLang(); const lang = useLang();
@ -92,6 +96,8 @@ const ProfilePhoto: FC<OwnProps> = ({
); );
const hasMedia = photo || previewBlobUrl || isBlurredThumb; const hasMedia = photo || previewBlobUrl || isBlurredThumb;
const { className: peerColorClass, style: peerColorStyle } = usePeerColor({ peer, theme });
useEffect(() => { useEffect(() => {
if (videoRef.current && !canPlayVideo) { if (videoRef.current && !canPlayVideo) {
videoRef.current.currentTime = 0; videoRef.current.currentTime = 0;
@ -170,7 +176,7 @@ const ProfilePhoto: FC<OwnProps> = ({
const fullClassName = buildClassName( const fullClassName = buildClassName(
'ProfilePhoto', 'ProfilePhoto',
getPeerColorClass(peer), peerColorClass,
isSavedMessages && 'saved-messages', isSavedMessages && 'saved-messages',
isAnonymousForwards && 'anonymous-forwards', isAnonymousForwards && 'anonymous-forwards',
isDeleted && 'deleted-account', isDeleted && 'deleted-account',
@ -180,7 +186,11 @@ const ProfilePhoto: FC<OwnProps> = ({
); );
return ( return (
<div className={fullClassName} onClick={hasMedia ? onClick : undefined} style={style}> <div
className={fullClassName}
style={buildStyle(style, peerColorStyle)}
onClick={hasMedia ? onClick : undefined}
>
{typeof content === 'string' ? renderText(content, ['hq_emoji']) : content} {typeof content === 'string' ? renderText(content, ['hq_emoji']) : content}
</div> </div>
); );

View File

@ -4,9 +4,10 @@ import type { ApiChatFolder } from '../../../api/types';
import buildClassName from '../../../util/buildClassName'; import buildClassName from '../../../util/buildClassName';
import { REM } from '../../common/helpers/mediaDimensions'; import { REM } from '../../common/helpers/mediaDimensions';
import { getApiPeerColorClass } from '../../common/helpers/peerColor';
import { renderTextWithEntities } from '../../common/helpers/renderTextWithEntities'; import { renderTextWithEntities } from '../../common/helpers/renderTextWithEntities';
import { getPeerColorClass } from '../../../hooks/usePeerColor';
import styles from './ChatTags.module.scss'; import styles from './ChatTags.module.scss';
const MAX_VISIBLE_TAGS = 3; const MAX_VISIBLE_TAGS = 3;
@ -39,7 +40,7 @@ const ChatTags = ({
key={folder.id} key={folder.id}
className={buildClassName( className={buildClassName(
styles.tag, styles.tag,
getApiPeerColorClass({ color: folder.color }), folder.color !== undefined && folder.color !== -1 && getPeerColorClass(folder.color),
itemClassName, itemClassName,
)} )}
> >

View File

@ -20,12 +20,12 @@ import { findIntersectionWithSet } from '../../../../util/iteratees';
import { MEMO_EMPTY_ARRAY } from '../../../../util/memo'; import { MEMO_EMPTY_ARRAY } from '../../../../util/memo';
import { CUSTOM_PEER_EXCLUDED_CHAT_TYPES, CUSTOM_PEER_INCLUDED_CHAT_TYPES } from '../../../../util/objects/customPeer'; import { CUSTOM_PEER_EXCLUDED_CHAT_TYPES, CUSTOM_PEER_INCLUDED_CHAT_TYPES } from '../../../../util/objects/customPeer';
import { LOCAL_TGS_URLS } from '../../../common/helpers/animatedAssets'; import { LOCAL_TGS_URLS } from '../../../common/helpers/animatedAssets';
import { getApiPeerColorClass } from '../../../common/helpers/peerColor';
import { renderTextWithEntities } from '../../../common/helpers/renderTextWithEntities'; import { renderTextWithEntities } from '../../../common/helpers/renderTextWithEntities';
import { selectChatFilters } from '../../../../hooks/reducers/useFoldersReducer'; import { selectChatFilters } from '../../../../hooks/reducers/useFoldersReducer';
import useHistoryBack from '../../../../hooks/useHistoryBack'; import useHistoryBack from '../../../../hooks/useHistoryBack';
import useOldLang from '../../../../hooks/useOldLang'; import useOldLang from '../../../../hooks/useOldLang';
import { getPeerColorClass } from '../../../../hooks/usePeerColor';
import AnimatedIconWithPreview from '../../../common/AnimatedIconWithPreview'; import AnimatedIconWithPreview from '../../../common/AnimatedIconWithPreview';
import GroupChatInfo from '../../../common/GroupChatInfo'; import GroupChatInfo from '../../../common/GroupChatInfo';
@ -362,7 +362,7 @@ const SettingsFoldersEdit: FC<OwnProps & StateProps> = ({
'color-picker-title', 'color-picker-title',
'color-picker-selected-color', 'color-picker-selected-color',
isCurrentUserPremium && state.folder.color !== undefined && state.folder.color !== -1 isCurrentUserPremium && state.folder.color !== undefined && state.folder.color !== -1
? getApiPeerColorClass({ color: state.folder.color }) ? getPeerColorClass(state.folder.color)
: 'color-picker-item-disabled', : 'color-picker-item-disabled',
)} )}
> >
@ -388,7 +388,7 @@ const SettingsFoldersEdit: FC<OwnProps & StateProps> = ({
}} }}
className={buildClassName( className={buildClassName(
'color-picker-item', 'color-picker-item',
getApiPeerColorClass({ color }), getPeerColorClass(color),
!isCurrentUserPremium && 'color-picker-item-hover-disabled', !isCurrentUserPremium && 'color-picker-item-hover-disabled',
color === state.folder.color && isCurrentUserPremium && 'color-picker-item-active', color === state.folder.color && isCurrentUserPremium && 'color-picker-item-active',
)} )}

View File

@ -15,12 +15,12 @@ import { isBetween } from '../../../../util/math';
import { MEMO_EMPTY_ARRAY } from '../../../../util/memo'; import { MEMO_EMPTY_ARRAY } from '../../../../util/memo';
import { throttle } from '../../../../util/schedulers'; import { throttle } from '../../../../util/schedulers';
import { LOCAL_TGS_URLS } from '../../../common/helpers/animatedAssets'; import { LOCAL_TGS_URLS } from '../../../common/helpers/animatedAssets';
import { getApiPeerColorClass } from '../../../common/helpers/peerColor';
import { renderTextWithEntities } from '../../../common/helpers/renderTextWithEntities'; import { renderTextWithEntities } from '../../../common/helpers/renderTextWithEntities';
import { useFolderManagerForChatsCount } from '../../../../hooks/useFolderManager'; import { useFolderManagerForChatsCount } from '../../../../hooks/useFolderManager';
import useHistoryBack from '../../../../hooks/useHistoryBack'; import useHistoryBack from '../../../../hooks/useHistoryBack';
import useLang from '../../../../hooks/useLang'; import useLang from '../../../../hooks/useLang';
import { getPeerColorClass } from '../../../../hooks/usePeerColor';
import usePreviousDeprecated from '../../../../hooks/usePreviousDeprecated'; import usePreviousDeprecated from '../../../../hooks/usePreviousDeprecated';
import AnimatedIconWithPreview from '../../../common/AnimatedIconWithPreview'; import AnimatedIconWithPreview from '../../../common/AnimatedIconWithPreview';
@ -338,7 +338,7 @@ const SettingsFoldersMain: FC<OwnProps & StateProps> = ({
shouldRenderColor && ( shouldRenderColor && (
<div className={buildClassName( <div className={buildClassName(
'settings-folders-color-circle', 'settings-folders-color-circle',
getApiPeerColorClass({ color: folder.color }), folder.color !== undefined && folder.color !== -1 && getPeerColorClass(folder.color),
)} )}
/> />
) )

View File

@ -1,5 +1,3 @@
import type { FC } from '../../../lib/teact/teact';
import type React from '../../../lib/teact/teact';
import { import {
memo, useEffect, useMemo, useRef, memo, useEffect, useMemo, useRef,
} from '../../../lib/teact/teact'; } from '../../../lib/teact/teact';
@ -8,7 +6,7 @@ import { getActions, getGlobal, withGlobal } from '../../../global';
import type { import type {
ApiChat, ApiInputMessageReplyInfo, ApiInputSuggestedPostInfo, ApiMessage, ApiPeer, ApiChat, ApiInputMessageReplyInfo, ApiInputSuggestedPostInfo, ApiMessage, ApiPeer,
} from '../../../api/types'; } from '../../../api/types';
import type { MessageListType, ThreadId } from '../../../types/index'; import type { MessageListType, ThemeKey, ThreadId } from '../../../types/index';
import { isChatChannel, stripCustomEmoji } from '../../../global/helpers'; import { isChatChannel, stripCustomEmoji } from '../../../global/helpers';
import { import {
@ -24,18 +22,19 @@ import {
selectIsCurrentUserPremium, selectIsCurrentUserPremium,
selectSender, selectSender,
selectTabState, selectTabState,
selectTheme,
} from '../../../global/selectors'; } from '../../../global/selectors';
import { selectIsMediaNsfw } from '../../../global/selectors/media'; import { selectIsMediaNsfw } from '../../../global/selectors/media';
import buildClassName from '../../../util/buildClassName'; import buildClassName from '../../../util/buildClassName';
import captureEscKeyListener from '../../../util/captureEscKeyListener'; import captureEscKeyListener from '../../../util/captureEscKeyListener';
import { unique } from '../../../util/iteratees'; import { unique } from '../../../util/iteratees';
import { getPeerColorClass } from '../../common/helpers/peerColor';
import useContextMenuHandlers from '../../../hooks/useContextMenuHandlers'; import useContextMenuHandlers from '../../../hooks/useContextMenuHandlers';
import useCurrentOrPrev from '../../../hooks/useCurrentOrPrev'; import useCurrentOrPrev from '../../../hooks/useCurrentOrPrev';
import useLang from '../../../hooks/useLang'; import useLang from '../../../hooks/useLang';
import useLastCallback from '../../../hooks/useLastCallback'; import useLastCallback from '../../../hooks/useLastCallback';
import useOldLang from '../../../hooks/useOldLang'; import useOldLang from '../../../hooks/useOldLang';
import usePeerColor from '../../../hooks/usePeerColor';
import useShowTransitionDeprecated from '../../../hooks/useShowTransitionDeprecated'; import useShowTransitionDeprecated from '../../../hooks/useShowTransitionDeprecated';
import { ClosableEmbeddedMessage } from '../../common/embedded/EmbeddedMessage'; import { ClosableEmbeddedMessage } from '../../common/embedded/EmbeddedMessage';
@ -69,6 +68,7 @@ type StateProps = {
forwardMessageIds?: number[]; forwardMessageIds?: number[];
fromChatId?: string; fromChatId?: string;
isMediaNsfw?: boolean; isMediaNsfw?: boolean;
theme: ThemeKey;
}; };
type OwnProps = { type OwnProps = {
@ -81,7 +81,7 @@ type OwnProps = {
const CLOSE_DURATION = 350; const CLOSE_DURATION = 350;
const ComposerEmbeddedMessage: FC<OwnProps & StateProps> = ({ const ComposerEmbeddedMessage = ({
replyInfo, replyInfo,
suggestedPostInfo, suggestedPostInfo,
editingId, editingId,
@ -105,8 +105,9 @@ const ComposerEmbeddedMessage: FC<OwnProps & StateProps> = ({
forwardMessageIds, forwardMessageIds,
fromChatId, fromChatId,
isMediaNsfw, isMediaNsfw,
theme,
onClear, onClear,
}) => { }: OwnProps & StateProps) => {
const { const {
resetDraftReplyInfo, resetDraftReplyInfo,
resetDraftSuggestedPostInfo, resetDraftSuggestedPostInfo,
@ -243,10 +244,12 @@ const ComposerEmbeddedMessage: FC<OwnProps & StateProps> = ({
const className = buildClassName('ComposerEmbeddedMessage', transitionClassNames); const className = buildClassName('ComposerEmbeddedMessage', transitionClassNames);
const renderingSender = useCurrentOrPrev(sender, true); const renderingSender = useCurrentOrPrev(sender, true);
const innerClassName = buildClassName(
'ComposerEmbeddedMessage_inner', const { className: peerColorClass, style: peerColorStyle } = usePeerColor({
getPeerColorClass(renderingSender), peer: renderingSender,
); theme,
});
const innerClassName = buildClassName('ComposerEmbeddedMessage_inner', peerColorClass);
const leftIcon = useMemo(() => { const leftIcon = useMemo(() => {
if (editingId) { if (editingId) {
@ -292,7 +295,7 @@ const ComposerEmbeddedMessage: FC<OwnProps & StateProps> = ({
return ( return (
<div className={className} ref={ref} onContextMenu={handleContextMenu}> <div className={className} ref={ref} onContextMenu={handleContextMenu}>
<div className={innerClassName}> <div className={innerClassName} style={peerColorStyle}>
<div className="embedded-left-icon" onClick={handleContextMenu}> <div className="embedded-left-icon" onClick={handleContextMenu}>
{renderingLeftIcon && <Icon name={renderingLeftIcon} />} {renderingLeftIcon && <Icon name={renderingLeftIcon} />}
{Boolean(replyInfo?.quoteText) && ( {Boolean(replyInfo?.quoteText) && (
@ -524,6 +527,7 @@ export default memo(withGlobal<OwnProps>(
forwardMessageIds, forwardMessageIds,
fromChatId, fromChatId,
isMediaNsfw, isMediaNsfw,
theme: selectTheme(global),
}; };
}, },
)(ComposerEmbeddedMessage)); )(ComposerEmbeddedMessage));

View File

@ -1,6 +1,6 @@
import { memo, useMemo, useRef } from '../../../lib/teact/teact'; import { memo, useMemo, useRef } from '../../../lib/teact/teact';
import type { ApiFactCheck } from '../../../api/types'; import type { ApiFactCheck, ApiPeerColor } from '../../../api/types';
import buildClassName from '../../../util/buildClassName'; import buildClassName from '../../../util/buildClassName';
import { renderTextWithEntities } from '../../common/helpers/renderTextWithEntities'; import { renderTextWithEntities } from '../../common/helpers/renderTextWithEntities';
@ -20,7 +20,8 @@ type OwnProps = {
isToggleDisabled?: boolean; isToggleDisabled?: boolean;
}; };
const COLOR = { const COLOR: ApiPeerColor = {
type: 'regular',
color: 0, color: 0,
}; };
const MAX_LINES = 4; const MAX_LINES = 4;

View File

@ -125,13 +125,13 @@ import { selectSharedSettings } from '../../../global/selectors/sharedState';
import { IS_TAURI } from '../../../util/browser/globalEnvironment'; import { IS_TAURI } from '../../../util/browser/globalEnvironment';
import { IS_ANDROID, IS_TRANSLATION_SUPPORTED } from '../../../util/browser/windowEnvironment'; import { IS_ANDROID, IS_TRANSLATION_SUPPORTED } from '../../../util/browser/windowEnvironment';
import buildClassName from '../../../util/buildClassName'; import buildClassName from '../../../util/buildClassName';
import buildStyle from '../../../util/buildStyle';
import { isUserId } from '../../../util/entities/ids'; import { isUserId } from '../../../util/entities/ids';
import { getMessageKey } from '../../../util/keys/messageKey'; import { getMessageKey } from '../../../util/keys/messageKey';
import { getServerTime } from '../../../util/serverTime'; import { getServerTime } from '../../../util/serverTime';
import stopEvent from '../../../util/stopEvent'; import stopEvent from '../../../util/stopEvent';
import { isElementInViewport } from '../../../util/visibility/isElementInViewport'; import { isElementInViewport } from '../../../util/visibility/isElementInViewport';
import { calculateDimensionsForMessageMedia, getStickerDimensions, REM } from '../../common/helpers/mediaDimensions'; import { calculateDimensionsForMessageMedia, getStickerDimensions, REM } from '../../common/helpers/mediaDimensions';
import { getPeerColorClass } from '../../common/helpers/peerColor';
import renderText from '../../common/helpers/renderText'; import renderText from '../../common/helpers/renderText';
import { getCustomEmojiSize } from '../composer/helpers/customEmoji'; import { getCustomEmojiSize } from '../composer/helpers/customEmoji';
import { buildContentClassName } from './helpers/buildContentClassName'; import { buildContentClassName } from './helpers/buildContentClassName';
@ -148,6 +148,7 @@ import { useOnIntersect } from '../../../hooks/useIntersectionObserver';
import useLang from '../../../hooks/useLang'; import useLang from '../../../hooks/useLang';
import useLastCallback from '../../../hooks/useLastCallback'; import useLastCallback from '../../../hooks/useLastCallback';
import useOldLang from '../../../hooks/useOldLang'; import useOldLang from '../../../hooks/useOldLang';
import usePeerColor from '../../../hooks/usePeerColor';
import usePreviousDeprecated from '../../../hooks/usePreviousDeprecated'; import usePreviousDeprecated from '../../../hooks/usePreviousDeprecated';
import useMessageResizeObserver from '../../../hooks/useResizeMessageObserver'; import useMessageResizeObserver from '../../../hooks/useResizeMessageObserver';
import useShowTransition from '../../../hooks/useShowTransition'; import useShowTransition from '../../../hooks/useShowTransition';
@ -805,6 +806,13 @@ const Message = ({
(photo || video || storyData || (location?.mediaType === 'geo')) && (!hasText || isInvertedMedia)) (photo || video || storyData || (location?.mediaType === 'geo')) && (!hasText || isInvertedMedia))
); );
const { className: peerColorClass, style: peerColorStyle } = usePeerColor({
peer: messageColorPeer,
noUserColors,
shouldReset: true,
theme,
});
const contentClassName = buildContentClassName(message, album, { const contentClassName = buildContentClassName(message, album, {
poll, poll,
webPage, webPage,
@ -820,7 +828,7 @@ const Message = ({
hasReactions, hasReactions,
isGeoLiveActive: location?.mediaType === 'geoLive' && !isGeoLiveExpired(message), isGeoLiveActive: location?.mediaType === 'geoLive' && !isGeoLiveExpired(message),
withVoiceTranscription, withVoiceTranscription,
peerColorClass: getPeerColorClass(messageColorPeer, noUserColors, true), peerColorClass,
hasOutsideReactions, hasOutsideReactions,
}); });
@ -987,9 +995,11 @@ const Message = ({
]); ]);
const { const {
contentWidth, style, reactionsMaxWidth, contentWidth, style: sizeStyles, reactionsMaxWidth,
} = sizeCalculations; } = sizeCalculations;
const contentStyle = buildStyle(peerColorStyle, sizeStyles);
function renderMessageText(isForAnimation?: boolean) { function renderMessageText(isForAnimation?: boolean) {
if (!textMessage) return undefined; if (!textMessage) return undefined;
return ( return (
@ -1710,7 +1720,7 @@ const Message = ({
> >
<div <div
className={contentClassName} className={contentClassName}
style={style} style={contentStyle}
dir="auto" dir="auto"
> >
{asForwarded && !isInDocumentGroupNotFirst && ( {asForwarded && !isInDocumentGroupNotFirst && (

View File

@ -12,6 +12,7 @@
height: auto; height: auto;
// Slight variation from mixins.header-pane // Slight variation from mixins.header-pane
padding-right: max(1rem, env(safe-area-inset-right));
padding-left: max(1rem, env(safe-area-inset-left)); padding-left: max(1rem, env(safe-area-inset-left));
line-height: 1.25; line-height: 1.25;
@ -24,7 +25,12 @@
} }
.content { .content {
display: flex;
flex-grow: 1; flex-grow: 1;
gap: 0.5rem;
align-items: center;
color: var(--color-text);
} }
.info { .info {

View File

@ -1,4 +1,3 @@
import type React from '../../../lib/teact/teact';
import { memo, useEffect } from '../../../lib/teact/teact'; import { memo, useEffect } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global'; import { getActions, withGlobal } from '../../../global';
@ -6,8 +5,6 @@ import type { ApiSponsoredMessage } from '../../../api/types';
import type { MessageListType } from '../../../types'; import type { MessageListType } from '../../../types';
import { selectBot, selectSponsoredMessage } from '../../../global/selectors'; import { selectBot, selectSponsoredMessage } from '../../../global/selectors';
import buildClassName from '../../../util/buildClassName';
import { getApiPeerColorClass } from '../../common/helpers/peerColor';
import { renderTextWithEntities } from '../../common/helpers/renderTextWithEntities'; import { renderTextWithEntities } from '../../common/helpers/renderTextWithEntities';
import useContextMenuHandlers from '../../../hooks/useContextMenuHandlers'; import useContextMenuHandlers from '../../../hooks/useContextMenuHandlers';
@ -18,6 +15,7 @@ import useHeaderPane, { type PaneState } from '../hooks/useHeaderPane';
import Avatar from '../../common/Avatar'; import Avatar from '../../common/Avatar';
import BadgeButton from '../../common/BadgeButton'; import BadgeButton from '../../common/BadgeButton';
import PeerColorWrapper from '../../common/PeerColorWrapper';
import SponsoredMessageContextMenuContainer from '../message/SponsoredContextMenuContainer'; import SponsoredMessageContextMenuContainer from '../message/SponsoredContextMenuContainer';
import styles from './BotAdPane.module.scss'; import styles from './BotAdPane.module.scss';
@ -66,17 +64,17 @@ const BotAdPane = ({
} = useContextMenuHandlers(ref, !shouldRender, true); } = useContextMenuHandlers(ref, !shouldRender, true);
const handleClick = useLastCallback(() => { const handleClick = useLastCallback(() => {
if (!renderingSponsoredMessage) return; if (!sponsoredMessage) return;
clickSponsored({ randomId: renderingSponsoredMessage.randomId }); clickSponsored({ randomId: sponsoredMessage.randomId });
openUrl({ url: renderingSponsoredMessage.url, shouldSkipModal: true }); openUrl({ url: sponsoredMessage.url, shouldSkipModal: true });
}); });
const handleAboutClick = useLastCallback((e: React.MouseEvent<HTMLDivElement>) => { const handleAboutClick = useLastCallback((e: React.MouseEvent<HTMLDivElement>) => {
if (!renderingSponsoredMessage) return; if (!sponsoredMessage) return;
const { const {
randomId, additionalInfo, canReport, sponsorInfo, randomId, additionalInfo, canReport, sponsorInfo,
} = renderingSponsoredMessage; } = sponsoredMessage;
e.stopPropagation(); e.stopPropagation();
openAboutAdsModal({ openAboutAdsModal({
randomId, randomId,
@ -116,30 +114,36 @@ const BotAdPane = ({
onMouseDown={handleBeforeContextMenu} onMouseDown={handleBeforeContextMenu}
onContextMenu={handleContextMenu} onContextMenu={handleContextMenu}
> >
<div className={buildClassName(styles.content, peerColor && getApiPeerColorClass(peerColor))}> <PeerColorWrapper
<span className={styles.info}> peerColor={peerColor}
{lang('SponsoredMessageAd')} noBar
<BadgeButton onClick={handleAboutClick} className={styles.aboutAd}> className={styles.content}
{lang('SponsoredMessageAdWhatIsThis')} >
</BadgeButton> {photo && (
</span> <Avatar
<div className={styles.title}>{title}</div> size="medium"
{content.text && ( photo={photo}
<div className={styles.text}> className={styles.avatar}
{renderTextWithEntities({ />
text: content.text.text,
entities: content.text.entities,
})}
</div>
)} )}
</div> <div className={styles.contentInner}>
{photo && ( <span className={styles.info}>
<Avatar {lang('SponsoredMessageAd')}
size="large" <BadgeButton onClick={handleAboutClick} className={styles.aboutAd}>
photo={photo} {lang('SponsoredMessageAdWhatIsThis')}
className={styles.avatar} </BadgeButton>
/> </span>
)} <div className={styles.title}>{title}</div>
{content.text && (
<div className={styles.text}>
{renderTextWithEntities({
text: content.text.text,
entities: content.text.entities,
})}
</div>
)}
</div>
</PeerColorWrapper>
</div> </div>
{contextMenuAnchor && ( {contextMenuAnchor && (
<SponsoredMessageContextMenuContainer <SponsoredMessageContextMenuContainer

View File

@ -7,6 +7,7 @@ import type {
ApiChatInviteInfo, ApiChatInviteInfo,
ApiMessage, ApiMessage,
ApiPeer, ApiPeer,
ApiPeerColorCollectible,
ApiPreparedInlineMessage, ApiPreparedInlineMessage,
ApiTopic, ApiTopic,
} from '../../api/types'; } from '../../api/types';
@ -363,18 +364,34 @@ export function getOrderedTopics(
} }
} }
export function getPeerColorKey(peer: ApiPeer | undefined) { export function getPeerColorKey(peer: ApiPeer | CustomPeer | undefined) {
if (peer?.color?.color) return peer.color.color; if (!peer) return 0;
return peer ? getPeerIdDividend(peer.id) % 7 : 0; if ('isCustomPeer' in peer) {
return peer.peerColorId;
}
if (peer.color) {
if (peer.color.type === 'collectible') return undefined; // Custom colors
if (peer.color.color !== undefined) return peer.color.color;
}
return getPeerIdDividend(peer.id) % 7;
} }
export function getPeerColorCount(peer: ApiPeer) { export function getPeerColorCount(peer: ApiPeer) {
const key = getPeerColorKey(peer); const key = getPeerColorKey(peer);
if (peer.color?.type === 'collectible') return getPeerColorCollectibleColorCount(peer.color);
if (key === undefined) return 1;
const global = getGlobal(); const global = getGlobal();
return global.peerColors?.general[key].colors?.length || 1; return global.peerColors?.general[key].colors?.length || 1;
} }
export function getPeerColorCollectibleColorCount(color: ApiPeerColorCollectible): number {
return color.colors.length;
}
export function getIsSavedDialog(chatId: string, threadId: ThreadId | undefined, currentUserId: string | undefined) { export function getIsSavedDialog(chatId: string, threadId: ThreadId | undefined, currentUserId: string | undefined) {
return chatId === currentUserId && threadId !== MAIN_THREAD_ID; return chatId === currentUserId && threadId !== MAIN_THREAD_ID;
} }

View File

@ -188,7 +188,12 @@ export function selectSettingsScreen<T extends GlobalState>(
} }
export function selectPeerProfileColor<T extends GlobalState>(global: T, peer: ApiPeer | CustomPeer) { export function selectPeerProfileColor<T extends GlobalState>(global: T, peer: ApiPeer | CustomPeer) {
const key = 'isCustomPeer' in peer ? peer.peerColorId : peer.profileColor?.color; const isCustomPeer = 'isCustomPeer' in peer;
const peerColorId = isCustomPeer ? peer.peerColorId : undefined;
const profileColor = !isCustomPeer ? peer.profileColor : undefined;
if (profileColor?.type === 'collectible') return undefined;
const key = profileColor?.color || peerColorId;
if (!key) return undefined; if (!key) return undefined;
return global.peerColors?.profile?.[key]; return global.peerColors?.profile?.[key];
} }

View File

@ -1,23 +0,0 @@
import type { ElementRef } from '../lib/teact/teact';
import { useEffect } from '../lib/teact/teact';
import { requestMeasure } from '../lib/fasterdom/fasterdom';
import { IS_TOUCH_ENV } from '../util/browser/windowEnvironment';
const DEFAULT_DURATION = 300;
export default function useFocusAfterAnimation(
ref: ElementRef<HTMLInputElement>, animationDuration = DEFAULT_DURATION,
) {
useEffect(() => {
if (IS_TOUCH_ENV) {
return;
}
setTimeout(() => {
requestMeasure(() => {
ref.current?.focus();
});
}, animationDuration);
}, [ref, animationDuration]);
}

View File

@ -34,12 +34,13 @@ export default function useMultiaccountInfo(currentUser?: ApiUser) {
useEffect(() => { useEffect(() => {
if (!isUpdater || !isSynced) return; if (!isUpdater || !isSynced) return;
const color = currentUser.color?.type === 'regular' ? currentUser.color.color : undefined;
storeAccountData(ACCOUNT_SLOT, { storeAccountData(ACCOUNT_SLOT, {
userId: currentUser.id, userId: currentUser.id,
firstName: currentUser.firstName, firstName: currentUser.firstName,
lastName: currentUser.lastName, lastName: currentUser.lastName,
emojiStatusId: currentUser.emojiStatus?.documentId, emojiStatusId: currentUser.emojiStatus?.documentId,
color: currentUser.color?.color, color,
isPremium: currentUser.isPremium, isPremium: currentUser.isPremium,
phone: currentUser.phoneNumber, phone: currentUser.phoneNumber,
}); });
@ -47,7 +48,7 @@ export default function useMultiaccountInfo(currentUser?: ApiUser) {
refresh(); refresh();
}, [ }, [
isUpdater, currentUser?.emojiStatus?.documentId, currentUser?.firstName, currentUser?.id, currentUser?.lastName, isUpdater, currentUser?.emojiStatus?.documentId, currentUser?.firstName, currentUser?.id, currentUser?.lastName,
currentUser?.color?.color, currentUser?.isPremium, currentUser?.phoneNumber, refresh, isSynced, currentUser?.color, currentUser?.isPremium, currentUser?.phoneNumber, refresh, isSynced,
]); ]);
const updateAvatar = useLastCallback(async (url: string, abortSignal?: AbortSignal) => { const updateAvatar = useLastCallback(async (url: string, abortSignal?: AbortSignal) => {

108
src/hooks/usePeerColor.ts Normal file
View File

@ -0,0 +1,108 @@
import { useRef } from '@teact';
import type { ApiPeer, ApiTypePeerColor } from '../api/types';
import type { CustomPeer, ThemeKey } from '../types';
import { getPeerColorCollectibleColorCount, getPeerColorCount, getPeerColorKey } from '../global/helpers';
import buildStyle from '../util/buildStyle';
import { generateColorVariations, generatePeerColorGradient } from '../util/theme';
import useSyncEffect from './useSyncEffect';
type PeerColorAttributes = {
className?: string;
style?: string;
};
type PeerColorProperties = PeerColorAttributes & {
backgroundEmojiId?: string;
giftEmojiId?: string;
};
export default function usePeerColor({
peer,
color,
noUserColors,
shouldReset,
theme,
}: {
peer?: ApiPeer | CustomPeer;
color?: ApiTypePeerColor;
noUserColors?: boolean;
shouldReset?: boolean;
theme: ThemeKey;
}): PeerColorProperties {
const propertiesRef = useRef<PeerColorAttributes>({});
const realPeer = peer && !('isCustomPeer' in peer) ? peer : undefined;
useSyncEffect(() => {
if (!peer) {
if (!shouldReset) {
propertiesRef.current = {};
return;
}
propertiesRef.current = {
className: noUserColors ? getPeerColorCountClass(1) : getPeerColorClass(0),
};
return;
}
if ('isCustomPeer' in peer) {
if (peer.peerColorId === undefined) {
propertiesRef.current = {};
return;
}
propertiesRef.current = { className: `peer-color-${peer.peerColorId}`, style: undefined };
return;
}
const peerColor = color || peer.color;
const isCollectible = peerColor?.type === 'collectible';
const colorCount = peer ? getPeerColorCount(peer)
: isCollectible ? getPeerColorCollectibleColorCount(peerColor) : 1;
const colorCountClass = getPeerColorCountClass(colorCount);
const key = (isCollectible || !peerColor?.color) ? getPeerColorKey(peer) : peerColor.color;
if (noUserColors) {
propertiesRef.current = { className: colorCountClass };
return;
}
if (peerColor?.type === 'collectible' && !noUserColors) {
const accentColor = theme === 'dark' && peerColor.darkAccentColor
? peerColor.darkAccentColor : peerColor.accentColor;
const colors = theme === 'dark' && peerColor.darkColors ? peerColor.darkColors : peerColor.colors;
const gradient = generatePeerColorGradient(colors);
const { bg, bgActive } = generateColorVariations(accentColor);
propertiesRef.current = {
className: colorCountClass,
style: buildStyle(
`--bar-gradient: ${gradient}`,
`--accent-color: ${accentColor}`,
`--accent-background-color: ${bg}`,
`--accent-background-active-color: ${bgActive}`,
),
};
return;
}
const className = (noUserColors || key === undefined) ? colorCountClass : getPeerColorClass(key);
propertiesRef.current = { className, style: undefined };
}, [noUserColors, shouldReset, theme, color, peer]);
return {
style: propertiesRef.current.style,
className: propertiesRef.current.className,
backgroundEmojiId: realPeer?.color?.backgroundEmojiId,
giftEmojiId: realPeer?.color?.type === 'collectible' ? realPeer.color.giftEmojiId : undefined,
};
}
export function getPeerColorClass(colorIndex: number) {
return `peer-color-${colorIndex}`;
}
export function getPeerColorCountClass(colorCount: number) {
return `peer-color-count-${colorCount}`;
}

View File

@ -138,6 +138,7 @@ class TelegramClient {
messages: messages.map((message) => createMockedMessage(peerId, message.id, this.mockData)), messages: messages.map((message) => createMockedMessage(peerId, message.id, this.mockData)),
chats: [], chats: [],
users: [], users: [],
topics: [],
}); });
} }
@ -158,11 +159,11 @@ class TelegramClient {
}); });
} }
if (request instanceof Api.channels.GetForumTopics) { if (request instanceof Api.messages.GetForumTopics) {
const channelId = getIdFromInputPeer(request.channel); const peerId = getIdFromInputPeer(request.peer);
if (!channelId) return undefined; if (!peerId) return undefined;
const topics = this.getChannel(channelId)?.forumTopics; const topics = this.getChannel(peerId)?.forumTopics;
if (!topics) return undefined; if (!topics) return undefined;
@ -173,7 +174,7 @@ class TelegramClient {
topics: topics topics: topics
.sort((a, b) => b.id - a.id) .sort((a, b) => b.id - a.id)
.map((topic) => { .map((topic) => {
return createMockedForumTopic(channelId, topic.id, this.mockData); return createMockedForumTopic(peerId, topic.id, this.mockData);
}).filter((topic) => { }).filter((topic) => {
if (offsetTopicId) { if (offsetTopicId) {
return topic.id < offsetTopicId; return topic.id < offsetTopicId;
@ -219,6 +220,7 @@ class TelegramClient {
messages: this.getMessagesFrom(peerId), messages: this.getMessagesFrom(peerId),
chats: [], chats: [],
users: [], users: [],
topics: [],
}); });
} }

View File

@ -3,7 +3,7 @@ import type TelegramClient from '../../MockClient';
import Api from '../../../tl/api'; import Api from '../../../tl/api';
export default async function<A, R>(mockClient: TelegramClient, request: Api.Request<A, R>) { export default async function<A, R>(mockClient: TelegramClient, request: Api.Request<A, R>) {
if (request instanceof Api.channels.GetForumTopics) { if (request instanceof Api.messages.GetForumTopics) {
await new Promise((resolve) => setTimeout(resolve, 2500)); await new Promise((resolve) => setTimeout(resolve, 2500));
} }
return 'pass'; return 'pass';

View File

@ -11,6 +11,7 @@ export default function<A, R>(mockClient: TelegramClient, request: Api.Request<A
], ],
chats: [], chats: [],
users: [], users: [],
topics: [],
}); });
} }
return 'pass'; return 'pass';

View File

@ -38,6 +38,7 @@ export default function createMockedForumTopic(chatId: string, topicId: number,
unreadMentionsCount, unreadMentionsCount,
unreadReactionsCount, unreadReactionsCount,
fromId: createMockedTypePeer(chatId, mockData), fromId: createMockedTypePeer(chatId, mockData),
peer: createMockedTypePeer(chatId, mockData),
...rest, ...rest,
}); });
} }

View File

@ -12,6 +12,6 @@ for (const tl of Object.values(Api)) {
} }
} }
export const LAYER = 213; export const LAYER = 216;
export { tlobjects }; export { tlobjects };

File diff suppressed because one or more lines are too long

View File

@ -69,7 +69,7 @@ storage.fileMov#4b09ebbc = storage.FileType;
storage.fileMp4#b3cea0e4 = storage.FileType; storage.fileMp4#b3cea0e4 = storage.FileType;
storage.fileWebp#1081464c = storage.FileType; storage.fileWebp#1081464c = storage.FileType;
userEmpty#d3bc4b7a id:long = User; userEmpty#d3bc4b7a id:long = User;
user#20b1422 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 bot_has_main_app:flags2.13?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<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor bot_active_users:flags2.12?int bot_verification_icon:flags2.14?long send_paid_messages_stars:flags2.15?long = User; user#20b1422 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 bot_has_main_app:flags2.13?true bot_forum_view:flags2.16?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<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor bot_active_users:flags2.12?int bot_verification_icon:flags2.14?long send_paid_messages_stars:flags2.15?long = User;
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto; 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; 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; userStatusEmpty#9d05049 = UserStatus;
@ -141,12 +141,12 @@ messageActionGroupCall#7a0d7f42 flags:# call:InputGroupCall duration:flags.0?int
messageActionInviteToGroupCall#502f92f7 call:InputGroupCall users:Vector<long> = MessageAction; messageActionInviteToGroupCall#502f92f7 call:InputGroupCall users:Vector<long> = MessageAction;
messageActionSetMessagesTTL#3c134d7b flags:# period:int auto_setting_from:flags.0?long = MessageAction; messageActionSetMessagesTTL#3c134d7b flags:# period:int auto_setting_from:flags.0?long = MessageAction;
messageActionGroupCallScheduled#b3a07661 call:InputGroupCall schedule_date:int = MessageAction; messageActionGroupCallScheduled#b3a07661 call:InputGroupCall schedule_date:int = MessageAction;
messageActionSetChatTheme#aa786345 emoticon:string = MessageAction; messageActionSetChatTheme#b91bbd3a theme:ChatTheme = MessageAction;
messageActionChatJoinedByRequest#ebbca3cb = MessageAction; messageActionChatJoinedByRequest#ebbca3cb = MessageAction;
messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction; messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction;
messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction; messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction;
messageActionGiftPremium#6c6274fa flags:# currency:string amount:long months:int crypto_currency:flags.0?string crypto_amount:flags.0?long message:flags.1?TextWithEntities = MessageAction; messageActionGiftPremium#6c6274fa flags:# currency:string amount:long months:int crypto_currency:flags.0?string crypto_amount:flags.0?long message:flags.1?TextWithEntities = MessageAction;
messageActionTopicCreate#d999256 flags:# title:string icon_color:int icon_emoji_id:flags.0?long = MessageAction; messageActionTopicCreate#d999256 flags:# title_missing:flags.1?true title:string icon_color:int icon_emoji_id:flags.0?long = MessageAction;
messageActionTopicEdit#c0944820 flags:# title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = MessageAction; messageActionTopicEdit#c0944820 flags:# title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = MessageAction;
messageActionSuggestProfilePhoto#57de635e photo:Photo = MessageAction; messageActionSuggestProfilePhoto#57de635e photo:Photo = MessageAction;
messageActionRequestedPeer#31518e9b button_id:int peers:Vector<Peer> = MessageAction; messageActionRequestedPeer#31518e9b button_id:int peers:Vector<Peer> = MessageAction;
@ -160,7 +160,7 @@ messageActionPaymentRefunded#41b3e202 flags:# peer:Peer currency:string total_am
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; 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; messageActionPrizeStars#b00c47a2 flags:# unclaimed:flags.0?true stars:long transaction_id:string boost_peer:Peer giveaway_msg_id:int = MessageAction;
messageActionStarGift#f24de7fa flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true upgraded:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true prepaid_upgrade:flags.13?true upgrade_separate:flags.16?true gift:StarGift message:flags.1?TextWithEntities convert_stars:flags.4?long upgrade_msg_id:flags.5?int upgrade_stars:flags.8?long from_id:flags.11?Peer peer:flags.12?Peer saved_id:flags.12?long prepaid_upgrade_hash:flags.14?string gift_msg_id:flags.15?int = MessageAction; messageActionStarGift#f24de7fa flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true upgraded:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true prepaid_upgrade:flags.13?true upgrade_separate:flags.16?true gift:StarGift message:flags.1?TextWithEntities convert_stars:flags.4?long upgrade_msg_id:flags.5?int upgrade_stars:flags.8?long from_id:flags.11?Peer peer:flags.12?Peer saved_id:flags.12?long prepaid_upgrade_hash:flags.14?string gift_msg_id:flags.15?int = MessageAction;
messageActionStarGiftUnique#34f762f3 flags:# upgrade:flags.0?true transferred:flags.1?true saved:flags.2?true refunded:flags.5?true prepaid_upgrade:flags.11?true gift:StarGift can_export_at:flags.3?int transfer_stars:flags.4?long from_id:flags.6?Peer peer:flags.7?Peer saved_id:flags.7?long resale_amount:flags.8?StarsAmount can_transfer_at:flags.9?int can_resell_at:flags.10?int = MessageAction; messageActionStarGiftUnique#95728543 flags:# upgrade:flags.0?true transferred:flags.1?true saved:flags.2?true refunded:flags.5?true prepaid_upgrade:flags.11?true assigned:flags.13?true gift:StarGift can_export_at:flags.3?int transfer_stars:flags.4?long from_id:flags.6?Peer peer:flags.7?Peer saved_id:flags.7?long resale_amount:flags.8?StarsAmount can_transfer_at:flags.9?int can_resell_at:flags.10?int drop_original_details_stars:flags.12?long = MessageAction;
messageActionPaidMessagesRefunded#ac1f1fcd count:int stars:long = MessageAction; messageActionPaidMessagesRefunded#ac1f1fcd count:int stars:long = MessageAction;
messageActionPaidMessagesPrice#84b88578 flags:# broadcast_messages_allowed:flags.0?true stars:long = MessageAction; messageActionPaidMessagesPrice#84b88578 flags:# broadcast_messages_allowed:flags.0?true stars:long = MessageAction;
messageActionConferenceCall#2ffe2f7a flags:# missed:flags.0?true active:flags.1?true video:flags.4?true call_id:long duration:flags.2?int other_participants:flags.3?Vector<Peer> = MessageAction; messageActionConferenceCall#2ffe2f7a flags:# missed:flags.0?true active:flags.1?true video:flags.4?true call_id:long duration:flags.2?int other_participants:flags.3?Vector<Peer> = MessageAction;
@ -170,6 +170,7 @@ messageActionSuggestedPostApproval#ee7a1596 flags:# rejected:flags.0?true balanc
messageActionSuggestedPostSuccess#95ddcf69 price:StarsAmount = MessageAction; messageActionSuggestedPostSuccess#95ddcf69 price:StarsAmount = MessageAction;
messageActionSuggestedPostRefund#69f916f8 flags:# payer_initiated:flags.0?true = MessageAction; messageActionSuggestedPostRefund#69f916f8 flags:# payer_initiated:flags.0?true = MessageAction;
messageActionGiftTon#a8a3c699 flags:# currency:string amount:long crypto_currency:string crypto_amount:long transaction_id:flags.0?string = MessageAction; messageActionGiftTon#a8a3c699 flags:# currency:string amount:long crypto_currency:string crypto_amount:long transaction_id:flags.0?string = MessageAction;
messageActionSuggestBirthday#2c8f2a25 birthday:Birthday = 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; 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; 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; photoEmpty#2331b22d id:long = Photo;
@ -184,7 +185,7 @@ geoPointEmpty#1117dd5f = GeoPoint;
geoPoint#b2a2f663 flags:# long:double lat:double access_hash:long accuracy_radius:flags.0?int = GeoPoint; geoPoint#b2a2f663 flags:# long:double lat:double access_hash:long accuracy_radius:flags.0?int = GeoPoint;
auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode; auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;
auth.sentCodeSuccess#2390fe44 authorization:auth.Authorization = auth.SentCode; auth.sentCodeSuccess#2390fe44 authorization:auth.Authorization = auth.SentCode;
auth.sentCodePaymentRequired#d7a2fcf9 store_product:string phone_code_hash:string support_email_address:string support_email_subject:string = auth.SentCode; auth.sentCodePaymentRequired#e0955a3c store_product:string phone_code_hash:string support_email_address:string support_email_subject:string currency:string amount:long = auth.SentCode;
auth.authorization#2ea2c0d4 flags:# setup_password_required:flags.1?true otherwise_relogin_days:flags.1?int tmp_sessions:flags.0?int future_auth_token:flags.2?bytes user:User = auth.Authorization; auth.authorization#2ea2c0d4 flags:# setup_password_required:flags.1?true otherwise_relogin_days:flags.1?int tmp_sessions:flags.0?int future_auth_token:flags.2?bytes user:User = auth.Authorization;
auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization; auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization;
auth.exportedAuthorization#b434e2b8 id:long bytes:bytes = auth.ExportedAuthorization; auth.exportedAuthorization#b434e2b8 id:long bytes:bytes = auth.ExportedAuthorization;
@ -208,7 +209,7 @@ inputReportReasonGeoIrrelevant#dbd4feed = ReportReason;
inputReportReasonFake#f5ddd6e7 = ReportReason; inputReportReasonFake#f5ddd6e7 = ReportReason;
inputReportReasonIllegalDrugs#a8eb2be = ReportReason; inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason; inputReportReasonPersonalDetails#9ec7863d = ReportReason;
userFull#3fd81e28 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 can_view_revenue:flags2.9?true bot_can_manage_emoji_status:flags2.10?true display_gifts_button:flags2.16?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 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 starref_program:flags2.11?StarRefProgram bot_verification:flags2.12?BotVerification send_paid_messages_stars:flags2.14?long disallowed_gifts:flags2.15?DisallowedGiftsSettings stars_rating:flags2.17?StarsRating stars_my_pending_rating:flags2.18?StarsRating stars_my_pending_rating_date:flags2.18?int main_tab:flags2.20?ProfileTab saved_music:flags2.21?Document = UserFull; userFull#a02bc13e 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 can_view_revenue:flags2.9?true bot_can_manage_emoji_status:flags2.10?true display_gifts_button:flags2.16?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:flags.15?ChatTheme private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights 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 starref_program:flags2.11?StarRefProgram bot_verification:flags2.12?BotVerification send_paid_messages_stars:flags2.14?long disallowed_gifts:flags2.15?DisallowedGiftsSettings stars_rating:flags2.17?StarsRating stars_my_pending_rating:flags2.18?StarsRating stars_my_pending_rating_date:flags2.18?int main_tab:flags2.20?ProfileTab saved_music:flags2.21?Document note:flags2.22?TextWithEntities = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact; contact#145ade0b user_id:long mutual:Bool = Contact;
importedContact#c13e3c50 user_id:long client_id:long = ImportedContact; importedContact#c13e3c50 user_id:long client_id:long = ImportedContact;
contactStatus#16d9703b user_id:long status:UserStatus = ContactStatus; contactStatus#16d9703b user_id:long status:UserStatus = ContactStatus;
@ -220,8 +221,8 @@ contacts.blockedSlice#e1664194 count:int blocked:Vector<PeerBlocked> chats:Vecto
messages.dialogs#15ba6c40 dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs; messages.dialogs#15ba6c40 dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs;
messages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs; messages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs;
messages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs; messages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs;
messages.messages#8c718e87 messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; messages.messages#1d73e7ea messages:Vector<Message> topics:Vector<ForumTopic> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.messagesSlice#762b263d flags:# inexact:flags.1?true count:int next_rate:flags.0?int offset_id_offset:flags.2?int search_flood:flags.3?SearchPostsFlood messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; messages.messagesSlice#5f206716 flags:# inexact:flags.1?true count:int next_rate:flags.0?int offset_id_offset:flags.2?int search_flood:flags.3?SearchPostsFlood messages:Vector<Message> topics:Vector<ForumTopic> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.channelMessages#c776ba4e flags:# inexact:flags.1?true pts:int count:int offset_id_offset:flags.2?int messages:Vector<Message> topics:Vector<ForumTopic> chats:Vector<Chat> users:Vector<User> = messages.Messages; messages.channelMessages#c776ba4e flags:# inexact:flags.1?true pts:int count:int offset_id_offset:flags.2?int messages:Vector<Message> topics:Vector<ForumTopic> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.messagesNotModified#74535f21 count:int = messages.Messages; messages.messagesNotModified#74535f21 count:int = messages.Messages;
messages.chats#64ff9fd5 chats:Vector<Chat> = messages.Chats; messages.chats#64ff9fd5 chats:Vector<Chat> = messages.Chats;
@ -248,7 +249,7 @@ inputMessagesFilterPinned#1bb00451 = MessagesFilter;
updateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update; updateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update;
updateMessageID#4e90bfd6 id:int random_id:long = Update; updateMessageID#4e90bfd6 id:int random_id:long = Update;
updateDeleteMessages#a20db0e5 messages:Vector<int> pts:int pts_count:int = Update; updateDeleteMessages#a20db0e5 messages:Vector<int> pts:int pts_count:int = Update;
updateUserTyping#c01e857f user_id:long action:SendMessageAction = Update; updateUserTyping#2a17bf5c flags:# user_id:long top_msg_id:flags.0?int action:SendMessageAction = Update;
updateChatUserTyping#83487af0 chat_id:long from_id:Peer action:SendMessageAction = Update; updateChatUserTyping#83487af0 chat_id:long from_id:Peer action:SendMessageAction = Update;
updateChatParticipants#7761198 participants:ChatParticipants = Update; updateChatParticipants#7761198 participants:ChatParticipants = Update;
updateUserStatus#e5bdf8de user_id:long status:UserStatus = Update; updateUserStatus#e5bdf8de user_id:long status:UserStatus = Update;
@ -265,7 +266,7 @@ updateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings
updateServiceNotification#ebe46819 flags:# popup:flags.0?true invert_media:flags.2?true inbox_date:flags.1?int type:string message:string media:MessageMedia entities:Vector<MessageEntity> = Update; updateServiceNotification#ebe46819 flags:# popup:flags.0?true invert_media:flags.2?true inbox_date:flags.1?int type:string message:string media:MessageMedia entities:Vector<MessageEntity> = Update;
updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update; updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update;
updateUserPhone#5492a13 user_id:long phone:string = Update; updateUserPhone#5492a13 user_id:long phone:string = Update;
updateReadHistoryInbox#9c974fdf flags:# folder_id:flags.0?int peer:Peer max_id:int still_unread_count:int pts:int pts_count:int = Update; updateReadHistoryInbox#9e84bc99 flags:# folder_id:flags.0?int peer:Peer top_msg_id:flags.1?int max_id:int still_unread_count:int pts:int pts_count:int = Update;
updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update; updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update;
updateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update; updateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update;
updateReadMessagesContents#f8227181 flags:# messages:Vector<int> pts:int pts_count:int date:flags.0?int = Update; updateReadMessagesContents#f8227181 flags:# messages:Vector<int> pts:int pts_count:int date:flags.0?int = Update;
@ -352,8 +353,6 @@ updateRecentEmojiStatuses#30f443db = Update;
updateRecentReactions#6f7863f4 = Update; updateRecentReactions#6f7863f4 = Update;
updateMoveStickerSetToTop#86fccf85 flags:# masks:flags.0?true emojis:flags.1?true stickerset:long = Update; updateMoveStickerSetToTop#86fccf85 flags:# masks:flags.0?true emojis:flags.1?true stickerset:long = Update;
updateMessageExtendedMedia#d5a41724 peer:Peer msg_id:int extended_media:Vector<MessageExtendedMedia> = Update; updateMessageExtendedMedia#d5a41724 peer:Peer msg_id:int extended_media:Vector<MessageExtendedMedia> = Update;
updateChannelPinnedTopic#192efbe3 flags:# pinned:flags.0?true channel_id:long topic_id:int = Update;
updateChannelPinnedTopics#fe198602 flags:# channel_id:long order:flags.0?Vector<int> = Update;
updateUser#20529438 user_id:long = Update; updateUser#20529438 user_id:long = Update;
updateAutoSaveSettings#ec05b097 = Update; updateAutoSaveSettings#ec05b097 = Update;
updateStory#75b3b798 peer:Peer story:StoryItem = Update; updateStory#75b3b798 peer:Peer story:StoryItem = Update;
@ -390,6 +389,10 @@ updateGroupCallChainBlocks#a477288f call:InputGroupCall sub_chain_id:int blocks:
updateReadMonoForumInbox#77b0e372 channel_id:long saved_peer_id:Peer read_max_id:int = Update; updateReadMonoForumInbox#77b0e372 channel_id:long saved_peer_id:Peer read_max_id:int = Update;
updateReadMonoForumOutbox#a4a79376 channel_id:long saved_peer_id:Peer read_max_id:int = Update; updateReadMonoForumOutbox#a4a79376 channel_id:long saved_peer_id:Peer read_max_id:int = Update;
updateMonoForumNoPaidException#9f812b08 flags:# exception:flags.0?true channel_id:long saved_peer_id:Peer = Update; updateMonoForumNoPaidException#9f812b08 flags:# exception:flags.0?true channel_id:long saved_peer_id:Peer = Update;
updateGroupCallMessage#78c314e0 call:InputGroupCall from_id:Peer random_id:long message:TextWithEntities = Update;
updateGroupCallEncryptedMessage#c957a766 call:InputGroupCall from_id:Peer encrypted_message:bytes = Update;
updatePinnedForumTopic#683b2c52 flags:# pinned:flags.0?true peer:Peer topic_id:int = Update;
updatePinnedForumTopics#def143d0 flags:# peer:Peer order:flags.0?Vector<int> = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State; 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.differenceEmpty#5d75a138 date:int seq:int = updates.Difference;
updates.difference#f49ca0 new_messages:Vector<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> state:updates.State = updates.Difference; updates.difference#f49ca0 new_messages:Vector<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> state:updates.State = updates.Difference;
@ -459,6 +462,7 @@ sendMessageHistoryImportAction#dbda9246 progress:int = SendMessageAction;
sendMessageChooseStickerAction#b05ac6b1 = SendMessageAction; sendMessageChooseStickerAction#b05ac6b1 = SendMessageAction;
sendMessageEmojiInteraction#25972bcb emoticon:string msg_id:int interaction:DataJSON = SendMessageAction; sendMessageEmojiInteraction#25972bcb emoticon:string msg_id:int interaction:DataJSON = SendMessageAction;
sendMessageEmojiInteractionSeen#b665902e emoticon:string = SendMessageAction; sendMessageEmojiInteractionSeen#b665902e emoticon:string = SendMessageAction;
sendMessageTextDraftAction#376d975c random_id:long text:TextWithEntities = SendMessageAction;
contacts.found#b3134d9d my_results:Vector<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found; contacts.found#b3134d9d my_results:Vector<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found;
inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey; inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey;
inputPrivacyKeyChatInvite#bdfb0426 = InputPrivacyKey; inputPrivacyKeyChatInvite#bdfb0426 = InputPrivacyKey;
@ -1058,7 +1062,7 @@ messageReplies#83d60fc2 flags:# comments:flags.0?true replies:int replies_pts:in
peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked; peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked;
stats.messageStats#7fe91c14 views_graph:StatsGraph reactions_by_emotion_graph:StatsGraph = stats.MessageStats; stats.messageStats#7fe91c14 views_graph:StatsGraph reactions_by_emotion_graph:StatsGraph = stats.MessageStats;
groupCallDiscarded#7780bcb4 id:long access_hash:long duration:int = GroupCall; groupCallDiscarded#7780bcb4 id:long access_hash:long duration:int = GroupCall;
groupCall#553b0ba1 flags:# join_muted:flags.1?true can_change_join_muted:flags.2?true join_date_asc:flags.6?true schedule_start_subscribed:flags.8?true can_start_video:flags.9?true record_video_active:flags.11?true rtmp_stream:flags.12?true listeners_hidden:flags.13?true conference:flags.14?true creator:flags.15?true id:long access_hash:long participants_count:int title:flags.3?string stream_dc_id:flags.4?int record_start_date:flags.5?int schedule_date:flags.7?int unmuted_video_count:flags.10?int unmuted_video_limit:int version:int invite_link:flags.16?string = GroupCall; groupCall#553b0ba1 flags:# join_muted:flags.1?true can_change_join_muted:flags.2?true join_date_asc:flags.6?true schedule_start_subscribed:flags.8?true can_start_video:flags.9?true record_video_active:flags.11?true rtmp_stream:flags.12?true listeners_hidden:flags.13?true conference:flags.14?true creator:flags.15?true messages_enabled:flags.17?true can_change_messages_enabled:flags.18?true min:flags.19?true id:long access_hash:long participants_count:int title:flags.3?string stream_dc_id:flags.4?int record_start_date:flags.5?int schedule_date:flags.7?int unmuted_video_count:flags.10?int unmuted_video_limit:int version:int invite_link:flags.16?string = GroupCall;
inputGroupCall#d8aa840f id:long access_hash:long = InputGroupCall; inputGroupCall#d8aa840f id:long access_hash:long = InputGroupCall;
inputGroupCallSlug#fe06823f slug:string = InputGroupCall; inputGroupCallSlug#fe06823f slug:string = InputGroupCall;
inputGroupCallInviteMessage#8c10603f msg_id:int = InputGroupCall; inputGroupCallInviteMessage#8c10603f msg_id:int = InputGroupCall;
@ -1097,6 +1101,10 @@ botCommandScopePeerUser#a1321f3 peer:InputPeer user_id:InputUser = BotCommandSco
account.resetPasswordFailedWait#e3779861 retry_date:int = account.ResetPasswordResult; account.resetPasswordFailedWait#e3779861 retry_date:int = account.ResetPasswordResult;
account.resetPasswordRequestedWait#e9effc7d until_date:int = account.ResetPasswordResult; account.resetPasswordRequestedWait#e9effc7d until_date:int = account.ResetPasswordResult;
account.resetPasswordOk#e926d63e = account.ResetPasswordResult; account.resetPasswordOk#e926d63e = account.ResetPasswordResult;
chatTheme#c3dffc04 emoticon:string = ChatTheme;
chatThemeUniqueGift#3458f9c8 gift:StarGift theme_settings:Vector<ThemeSettings> = ChatTheme;
account.chatThemesNotModified#e011e1c4 = account.ChatThemes;
account.chatThemes#be098173 flags:# hash:long themes:Vector<ChatTheme> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = account.ChatThemes;
sponsoredMessage#7dbf8673 flags:# recommended:flags.5?true can_report:flags.12?true random_id:bytes url:string title:string message:string entities:flags.1?Vector<MessageEntity> photo:flags.6?Photo media:flags.14?MessageMedia color:flags.13?PeerColor button_text:string sponsor_info:flags.7?string additional_info:flags.8?string min_display_duration:flags.15?int max_display_duration:flags.15?int = SponsoredMessage; sponsoredMessage#7dbf8673 flags:# recommended:flags.5?true can_report:flags.12?true random_id:bytes url:string title:string message:string entities:flags.1?Vector<MessageEntity> photo:flags.6?Photo media:flags.14?MessageMedia color:flags.13?PeerColor button_text:string sponsor_info:flags.7?string additional_info:flags.8?string min_display_duration:flags.15?int max_display_duration:flags.15?int = SponsoredMessage;
messages.sponsoredMessages#ffda656d flags:# posts_between:flags.0?int start_delay:flags.1?int between_delay:flags.2?int messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages; messages.sponsoredMessages#ffda656d flags:# posts_between:flags.0?int start_delay:flags.1?int between_delay:flags.2?int messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages;
messages.sponsoredMessagesEmpty#1839490f = messages.SponsoredMessages; messages.sponsoredMessagesEmpty#1839490f = messages.SponsoredMessages;
@ -1154,6 +1162,8 @@ inputInvoicePremiumGiftStars#dabab2ef flags:# user_id:InputUser months:int messa
inputInvoiceBusinessBotTransferStars#f4997e42 bot:InputUser stars:long = InputInvoice; inputInvoiceBusinessBotTransferStars#f4997e42 bot:InputUser stars:long = InputInvoice;
inputInvoiceStarGiftResale#c39f5324 flags:# ton:flags.0?true slug:string to_id:InputPeer = InputInvoice; inputInvoiceStarGiftResale#c39f5324 flags:# ton:flags.0?true slug:string to_id:InputPeer = InputInvoice;
inputInvoiceStarGiftPrepaidUpgrade#9a0b48b8 peer:InputPeer hash:string = InputInvoice; inputInvoiceStarGiftPrepaidUpgrade#9a0b48b8 peer:InputPeer hash:string = InputInvoice;
inputInvoicePremiumAuthCode#3e77f614 purpose:InputStorePaymentPurpose = InputInvoice;
inputInvoiceStarGiftDropOriginalDetails#923d8d1 stargift:InputSavedStarGift = InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice; 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; 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; 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;
@ -1196,7 +1206,7 @@ messageExtendedMedia#ee479c64 media:MessageMedia = MessageExtendedMedia;
stickerKeyword#fcfeb29c document_id:long keyword:Vector<string> = StickerKeyword; stickerKeyword#fcfeb29c document_id:long keyword:Vector<string> = StickerKeyword;
username#b4073647 flags:# editable:flags.0?true active:flags.1?true username:string = Username; username#b4073647 flags:# editable:flags.0?true active:flags.1?true username:string = Username;
forumTopicDeleted#23f109b id:int = ForumTopic; forumTopicDeleted#23f109b id:int = ForumTopic;
forumTopic#71701da9 flags:# my:flags.1?true closed:flags.2?true pinned:flags.3?true short:flags.5?true hidden:flags.6?true id:int date:int title:string icon_color:int icon_emoji_id:flags.0?long top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int from_id:Peer notify_settings:PeerNotifySettings draft:flags.4?DraftMessage = ForumTopic; forumTopic#cdff0eca flags:# my:flags.1?true closed:flags.2?true pinned:flags.3?true short:flags.5?true hidden:flags.6?true title_missing:flags.7?true id:int date:int peer:Peer title:string icon_color:int icon_emoji_id:flags.0?long top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int from_id:Peer notify_settings:PeerNotifySettings draft:flags.4?DraftMessage = ForumTopic;
messages.forumTopics#367617d3 flags:# order_by_create_date:flags.0?true count:int topics:Vector<ForumTopic> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> pts:int = messages.ForumTopics; messages.forumTopics#367617d3 flags:# order_by_create_date:flags.0?true count:int topics:Vector<ForumTopic> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> pts:int = messages.ForumTopics;
defaultHistoryTTL#43b46b20 period:int = DefaultHistoryTTL; defaultHistoryTTL#43b46b20 period:int = DefaultHistoryTTL;
exportedContactToken#41bf109b url:string expires:int = ExportedContactToken; exportedContactToken#41bf109b url:string expires:int = ExportedContactToken;
@ -1284,6 +1294,8 @@ publicForwardMessage#1f2bf4a message:Message = PublicForward;
publicForwardStory#edf3add0 peer:Peer story:StoryItem = PublicForward; publicForwardStory#edf3add0 peer:Peer story:StoryItem = PublicForward;
stats.publicForwards#93037e20 flags:# count:int forwards:Vector<PublicForward> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = stats.PublicForwards; stats.publicForwards#93037e20 flags:# count:int forwards:Vector<PublicForward> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = stats.PublicForwards;
peerColor#b54b5acf flags:# color:flags.0?int background_emoji_id:flags.1?long = PeerColor; peerColor#b54b5acf flags:# color:flags.0?int background_emoji_id:flags.1?long = PeerColor;
peerColorCollectible#b9c0639a flags:# collectible_id:long gift_emoji_id:long background_emoji_id:long accent_color:int colors:Vector<int> dark_accent_color:flags.0?int dark_colors:flags.1?Vector<int> = PeerColor;
inputPeerColorCollectible#b8ea86a9 collectible_id:long = PeerColor;
help.peerColorSet#26219a58 colors:Vector<int> = help.PeerColorSet; help.peerColorSet#26219a58 colors:Vector<int> = help.PeerColorSet;
help.peerColorProfileSet#767d61eb palette_colors:Vector<int> bg_colors:Vector<int> story_colors:Vector<int> = help.PeerColorSet; help.peerColorProfileSet#767d61eb palette_colors:Vector<int> bg_colors:Vector<int> story_colors:Vector<int> = help.PeerColorSet;
help.peerColorOption#adec6ebe flags:# hidden:flags.0?true color_id:int colors:flags.1?help.PeerColorSet dark_colors:flags.2?help.PeerColorSet channel_min_level:flags.3?int group_min_level:flags.4?int = help.PeerColorOption; help.peerColorOption#adec6ebe flags:# hidden:flags.0?true color_id:int colors:flags.1?help.PeerColorSet dark_colors:flags.2?help.PeerColorSet channel_min_level:flags.3?int group_min_level:flags.4?int = help.PeerColorOption;
@ -1369,7 +1381,7 @@ starsTransactionPeer#d80da15d peer:Peer = StarsTransactionPeer;
starsTransactionPeerAds#60682812 = StarsTransactionPeer; starsTransactionPeerAds#60682812 = StarsTransactionPeer;
starsTransactionPeerAPI#f9677aad = StarsTransactionPeer; starsTransactionPeerAPI#f9677aad = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption; starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
starsTransaction#13659eb0 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true stargift_upgrade:flags.18?true business_transfer:flags.21?true stargift_resale:flags.22?true posts_search:flags.24?true stargift_prepaid_upgrade:flags.25?true id:string amount:StarsAmount 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 floodskip_number:flags.15?int starref_commission_permille:flags.16?int starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount paid_messages:flags.19?int premium_gift_months:flags.20?int ads_proceeds_from_date:flags.23?int ads_proceeds_to_date:flags.23?int = StarsTransaction; starsTransaction#13659eb0 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true stargift_upgrade:flags.18?true business_transfer:flags.21?true stargift_resale:flags.22?true posts_search:flags.24?true stargift_prepaid_upgrade:flags.25?true stargift_drop_original_details:flags.26?true id:string amount:StarsAmount 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 floodskip_number:flags.15?int starref_commission_permille:flags.16?int starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount paid_messages:flags.19?int premium_gift_months:flags.20?int ads_proceeds_from_date:flags.23?int ads_proceeds_to_date:flags.23?int = StarsTransaction;
payments.starsStatus#6c9ce8ed flags:# balance:StarsAmount 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; payments.starsStatus#6c9ce8ed flags:# balance:StarsAmount 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; 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; stories.foundStories#e2de7737 flags:# count:int stories:Vector<FoundStory> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = stories.FoundStories;
@ -1388,8 +1400,8 @@ starsSubscription#2e6eab1a 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; 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; 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; starsGiveawayWinnersOption#54236209 flags:# default:flags.0?true users:int per_user_stars:long = StarsGiveawayWinnersOption;
starGift#80ac53c3 flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true require_premium:flags.7?true limited_per_user:flags.8?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int availability_resale:flags.4?long convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long resell_min_stars:flags.4?long title:flags.5?string released_by:flags.6?Peer per_user_total:flags.8?int per_user_remains:flags.8?int locked_until_date:flags.9?int = StarGift; starGift#80ac53c3 flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true require_premium:flags.7?true limited_per_user:flags.8?true peer_color_available:flags.10?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int availability_resale:flags.4?long convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long resell_min_stars:flags.4?long title:flags.5?string released_by:flags.6?Peer per_user_total:flags.8?int per_user_remains:flags.8?int locked_until_date:flags.9?int = StarGift;
starGiftUnique#26a5553e flags:# require_premium:flags.6?true resale_ton_only:flags.7?true id:long gift_id:long title:string slug:string num:int owner_id:flags.0?Peer owner_name:flags.1?string owner_address:flags.2?string attributes:Vector<StarGiftAttribute> availability_issued:int availability_total:int gift_address:flags.3?string resell_amount:flags.4?Vector<StarsAmount> released_by:flags.5?Peer value_amount:flags.8?long value_currency:flags.8?string = StarGift; starGiftUnique#b0bf741b flags:# require_premium:flags.6?true resale_ton_only:flags.7?true theme_available:flags.9?true id:long gift_id:long title:string slug:string num:int owner_id:flags.0?Peer owner_name:flags.1?string owner_address:flags.2?string attributes:Vector<StarGiftAttribute> availability_issued:int availability_total:int gift_address:flags.3?string resell_amount:flags.4?Vector<StarsAmount> released_by:flags.5?Peer value_amount:flags.8?long value_currency:flags.8?string theme_peer:flags.10?Peer peer_color:flags.11?PeerColor host_id:flags.12?Peer = StarGift;
payments.starGiftsNotModified#a388a368 = payments.StarGifts; payments.starGiftsNotModified#a388a368 = payments.StarGifts;
payments.starGifts#2ed82995 hash:int gifts:Vector<StarGift> chats:Vector<Chat> users:Vector<User> = payments.StarGifts; payments.starGifts#2ed82995 hash:int gifts:Vector<StarGift> chats:Vector<Chat> users:Vector<User> = payments.StarGifts;
messageReportOption#7903e3d9 text:string option:bytes = MessageReportOption; messageReportOption#7903e3d9 text:string option:bytes = MessageReportOption;
@ -1413,12 +1425,12 @@ starGiftAttributeModel#39d99013 name:string document:Document rarity_permille:in
starGiftAttributePattern#13acff19 name:string document:Document rarity_permille:int = StarGiftAttribute; starGiftAttributePattern#13acff19 name:string document:Document rarity_permille:int = StarGiftAttribute;
starGiftAttributeBackdrop#d93d859c name:string backdrop_id:int center_color:int edge_color:int pattern_color:int text_color:int rarity_permille:int = StarGiftAttribute; starGiftAttributeBackdrop#d93d859c name:string backdrop_id:int center_color:int edge_color:int pattern_color:int text_color:int rarity_permille:int = StarGiftAttribute;
starGiftAttributeOriginalDetails#e0bff26c flags:# sender_id:flags.0?Peer recipient_id:Peer date:int message:flags.1?TextWithEntities = StarGiftAttribute; starGiftAttributeOriginalDetails#e0bff26c flags:# sender_id:flags.0?Peer recipient_id:Peer date:int message:flags.1?TextWithEntities = StarGiftAttribute;
payments.starGiftUpgradePreview#167bd90b sample_attributes:Vector<StarGiftAttribute> = payments.StarGiftUpgradePreview; payments.starGiftUpgradePreview#3de1dfed sample_attributes:Vector<StarGiftAttribute> prices:Vector<StarGiftUpgradePrice> next_prices:Vector<StarGiftUpgradePrice> = payments.StarGiftUpgradePreview;
users.users#62d706b8 users:Vector<User> = users.Users; users.users#62d706b8 users:Vector<User> = users.Users;
users.usersSlice#315a4974 count:int users:Vector<User> = users.Users; users.usersSlice#315a4974 count:int users:Vector<User> = users.Users;
payments.uniqueStarGift#416c56e8 gift:StarGift chats:Vector<Chat> users:Vector<User> = payments.UniqueStarGift; payments.uniqueStarGift#416c56e8 gift:StarGift chats:Vector<Chat> users:Vector<User> = payments.UniqueStarGift;
messages.webPagePreview#8c9a88ac media:MessageMedia chats:Vector<Chat> users:Vector<User> = messages.WebPagePreview; messages.webPagePreview#8c9a88ac media:MessageMedia chats:Vector<Chat> users:Vector<User> = messages.WebPagePreview;
savedStarGift#19a9b572 flags:# name_hidden:flags.0?true unsaved:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true pinned_to_top:flags.12?true upgrade_separate:flags.17?true from_id:flags.1?Peer date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int saved_id:flags.11?long convert_stars:flags.4?long upgrade_stars:flags.6?long can_export_at:flags.7?int transfer_stars:flags.8?long can_transfer_at:flags.13?int can_resell_at:flags.14?int collection_id:flags.15?Vector<int> prepaid_upgrade_hash:flags.16?string = SavedStarGift; savedStarGift#8983a452 flags:# name_hidden:flags.0?true unsaved:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true pinned_to_top:flags.12?true upgrade_separate:flags.17?true from_id:flags.1?Peer date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int saved_id:flags.11?long convert_stars:flags.4?long upgrade_stars:flags.6?long can_export_at:flags.7?int transfer_stars:flags.8?long can_transfer_at:flags.13?int can_resell_at:flags.14?int collection_id:flags.15?Vector<int> prepaid_upgrade_hash:flags.16?string drop_original_details_stars:flags.18?long = SavedStarGift;
payments.savedStarGifts#95f389b1 flags:# count:int chat_notifications_enabled:flags.1?Bool gifts:Vector<SavedStarGift> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.SavedStarGifts; payments.savedStarGifts#95f389b1 flags:# count:int chat_notifications_enabled:flags.1?Bool gifts:Vector<SavedStarGift> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.SavedStarGifts;
inputSavedStarGiftUser#69279795 msg_id:int = InputSavedStarGift; inputSavedStarGiftUser#69279795 msg_id:int = InputSavedStarGift;
inputSavedStarGiftChat#f101aa7f peer:InputPeer saved_id:long = InputSavedStarGift; inputSavedStarGiftChat#f101aa7f peer:InputPeer saved_id:long = InputSavedStarGift;
@ -1470,6 +1482,10 @@ account.savedMusicIdsNotModified#4fc81d6e = account.SavedMusicIds;
account.savedMusicIds#998d6636 ids:Vector<long> = account.SavedMusicIds; account.savedMusicIds#998d6636 ids:Vector<long> = account.SavedMusicIds;
payments.checkCanSendGiftResultOk#374fa7ad = payments.CheckCanSendGiftResult; payments.checkCanSendGiftResultOk#374fa7ad = payments.CheckCanSendGiftResult;
payments.checkCanSendGiftResultFail#d5e58274 reason:TextWithEntities = payments.CheckCanSendGiftResult; payments.checkCanSendGiftResultFail#d5e58274 reason:TextWithEntities = payments.CheckCanSendGiftResult;
inputChatThemeEmpty#83268483 = InputChatTheme;
inputChatTheme#c93de95c emoticon:string = InputChatTheme;
inputChatThemeUniqueGift#87e5dfe4 slug:string = InputChatTheme;
starGiftUpgradePrice#99ea331d date:int upgrade_stars:long = StarGiftUpgradePrice;
---functions--- ---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; 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; 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;
@ -1549,7 +1565,7 @@ contacts.getBlocked#9a868f80 flags:# my_stories_from:flags.0?true offset:int lim
contacts.search#11f812d8 q:string limit:int = contacts.Found; contacts.search#11f812d8 q:string limit:int = contacts.Found;
contacts.resolveUsername#725afbbc flags:# username:string referer:flags.0?string = contacts.ResolvedPeer; contacts.resolveUsername#725afbbc flags:# username:string referer:flags.0?string = contacts.ResolvedPeer;
contacts.getTopPeers#973478b6 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true bots_app:flags.16?true offset:int limit:int hash:long = contacts.TopPeers; contacts.getTopPeers#973478b6 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true bots_app:flags.16?true offset:int limit:int hash:long = contacts.TopPeers;
contacts.addContact#e8f463d0 flags:# add_phone_privacy_exception:flags.0?true id:InputUser first_name:string last_name:string phone:string = Updates; contacts.addContact#d9ba2e54 flags:# add_phone_privacy_exception:flags.0?true id:InputUser first_name:string last_name:string phone:string note:flags.1?TextWithEntities = Updates;
contacts.resolvePhone#8af94344 phone:string = contacts.ResolvedPeer; contacts.resolvePhone#8af94344 phone:string = contacts.ResolvedPeer;
contacts.editCloseFriends#ba6705f0 id:Vector<long> = Bool; contacts.editCloseFriends#ba6705f0 id:Vector<long> = Bool;
contacts.getSponsoredPeers#b6c8c393 q:string = contacts.SponsoredPeers; contacts.getSponsoredPeers#b6c8c393 q:string = contacts.SponsoredPeers;
@ -1703,6 +1719,12 @@ messages.reportMessagesDelivery#5a6d7395 flags:# push:flags.0?true peer:InputPee
messages.toggleTodoCompleted#d3e03124 peer:InputPeer msg_id:int completed:Vector<int> incompleted:Vector<int> = Updates; messages.toggleTodoCompleted#d3e03124 peer:InputPeer msg_id:int completed:Vector<int> incompleted:Vector<int> = Updates;
messages.appendTodoList#21a61057 peer:InputPeer msg_id:int list:Vector<TodoItem> = Updates; messages.appendTodoList#21a61057 peer:InputPeer msg_id:int list:Vector<TodoItem> = Updates;
messages.toggleSuggestedPostApproval#8107455c flags:# reject:flags.1?true peer:InputPeer msg_id:int schedule_date:flags.0?int reject_comment:flags.2?string = Updates; messages.toggleSuggestedPostApproval#8107455c flags:# reject:flags.1?true peer:InputPeer msg_id:int schedule_date:flags.0?int reject_comment:flags.2?string = Updates;
messages.getForumTopics#3ba47bff flags:# peer:InputPeer q:flags.0?string offset_date:int offset_id:int offset_topic:int limit:int = messages.ForumTopics;
messages.getForumTopicsByID#af0a4a08 peer:InputPeer topics:Vector<int> = messages.ForumTopics;
messages.editForumTopic#cecc1134 flags:# peer:InputPeer topic_id:int title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = Updates;
messages.updatePinnedForumTopic#175df251 peer:InputPeer topic_id:int pinned:Bool = Updates;
messages.createForumTopic#2f98c3d5 flags:# title_missing:flags.4?true peer:InputPeer title:string icon_color:flags.0?int icon_emoji_id:flags.3?long random_id:long send_as:flags.2?InputPeer = Updates;
messages.deleteTopicHistory#d2816f10 peer:InputPeer top_msg_id:int = messages.AffectedHistory;
updates.getState#edd4882a = updates.State; 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.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; updates.getChannelDifference#3173d78 flags:# force:flags.0?true channel:InputChannel filter:ChannelMessagesFilter pts:int limit:int = updates.ChannelDifference;
@ -1758,12 +1780,6 @@ channels.reorderUsernames#b45ced1d channel:InputChannel order:Vector<string> = B
channels.toggleUsername#50f24105 channel:InputChannel username:string active:Bool = Bool; channels.toggleUsername#50f24105 channel:InputChannel username:string active:Bool = Bool;
channels.deactivateAllUsernames#a245dd3 channel:InputChannel = Bool; channels.deactivateAllUsernames#a245dd3 channel:InputChannel = Bool;
channels.toggleForum#3ff75734 channel:InputChannel enabled:Bool tabs:Bool = Updates; channels.toggleForum#3ff75734 channel:InputChannel enabled:Bool tabs:Bool = Updates;
channels.createForumTopic#f40c0224 flags:# channel:InputChannel title:string icon_color:flags.0?int icon_emoji_id:flags.3?long random_id:long send_as:flags.2?InputPeer = Updates;
channels.getForumTopics#de560d1 flags:# channel:InputChannel q:flags.0?string offset_date:int offset_id:int offset_topic:int limit:int = messages.ForumTopics;
channels.getForumTopicsByID#b0831eb9 channel:InputChannel topics:Vector<int> = messages.ForumTopics;
channels.editForumTopic#f4dfa185 flags:# channel:InputChannel topic_id:int title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = Updates;
channels.updatePinnedForumTopic#6c2d9026 channel:InputChannel topic_id:int pinned:Bool = Updates;
channels.deleteTopicHistory#34435f2d channel:InputChannel top_msg_id:int = messages.AffectedHistory;
channels.toggleParticipantsHidden#6a6e7854 channel:InputChannel enabled:Bool = Updates; channels.toggleParticipantsHidden#6a6e7854 channel:InputChannel enabled:Bool = Updates;
channels.toggleViewForumAsMessages#9738bb15 channel:InputChannel enabled:Bool = Updates; channels.toggleViewForumAsMessages#9738bb15 channel:InputChannel enabled:Bool = Updates;
channels.getChannelRecommendations#25a71742 flags:# channel:flags.0?InputChannel = messages.Chats; channels.getChannelRecommendations#25a71742 flags:# channel:flags.0?InputChannel = messages.Chats;
@ -1809,7 +1825,7 @@ payments.getStarGiftUpgradePreview#9c9abcb1 gift_id:long = payments.StarGiftUpgr
payments.upgradeStarGift#aed6e4f5 flags:# keep_original_details:flags.0?true stargift:InputSavedStarGift = Updates; payments.upgradeStarGift#aed6e4f5 flags:# keep_original_details:flags.0?true stargift:InputSavedStarGift = Updates;
payments.transferStarGift#7f18176a stargift:InputSavedStarGift to_id:InputPeer = Updates; payments.transferStarGift#7f18176a stargift:InputSavedStarGift to_id:InputPeer = Updates;
payments.getUniqueStarGift#a1974d72 slug:string = payments.UniqueStarGift; payments.getUniqueStarGift#a1974d72 slug:string = payments.UniqueStarGift;
payments.getSavedStarGifts#a319e569 flags:# exclude_unsaved:flags.0?true exclude_saved:flags.1?true exclude_unlimited:flags.2?true exclude_unique:flags.4?true sort_by_value:flags.5?true exclude_upgradable:flags.7?true exclude_unupgradable:flags.8?true peer:InputPeer collection_id:flags.6?int offset:string limit:int = payments.SavedStarGifts; payments.getSavedStarGifts#a319e569 flags:# exclude_unsaved:flags.0?true exclude_saved:flags.1?true exclude_unlimited:flags.2?true exclude_unique:flags.4?true sort_by_value:flags.5?true exclude_upgradable:flags.7?true exclude_unupgradable:flags.8?true peer_color_available:flags.9?true exclude_hosted:flags.10?true peer:InputPeer collection_id:flags.6?int offset:string limit:int = payments.SavedStarGifts;
payments.getStarGiftWithdrawalUrl#d06e93a8 stargift:InputSavedStarGift password:InputCheckPasswordSRP = payments.StarGiftWithdrawalUrl; payments.getStarGiftWithdrawalUrl#d06e93a8 stargift:InputSavedStarGift password:InputCheckPasswordSRP = payments.StarGiftWithdrawalUrl;
payments.toggleStarGiftsPinnedToTop#1513e7b0 peer:InputPeer stargift:Vector<InputSavedStarGift> = Bool; payments.toggleStarGiftsPinnedToTop#1513e7b0 peer:InputPeer stargift:Vector<InputSavedStarGift> = Bool;
payments.getResaleStarGifts#7a5fa236 flags:# sort_by_price:flags.1?true sort_by_num:flags.2?true attributes_hash:flags.0?long gift_id:long attributes:flags.3?Vector<StarGiftAttributeId> offset:string limit:int = payments.ResaleStarGifts; payments.getResaleStarGifts#7a5fa236 flags:# sort_by_price:flags.1?true sort_by_num:flags.2?true attributes_hash:flags.0?long gift_id:long attributes:flags.3?Vector<StarGiftAttributeId> offset:string limit:int = payments.ResaleStarGifts;

View File

@ -229,6 +229,12 @@
"messages.reportMessagesDelivery", "messages.reportMessagesDelivery",
"messages.getPreparedInlineMessage", "messages.getPreparedInlineMessage",
"messages.toggleSuggestedPostApproval", "messages.toggleSuggestedPostApproval",
"messages.createForumTopic",
"messages.getForumTopics",
"messages.getForumTopicsByID",
"messages.editForumTopic",
"messages.updatePinnedForumTopic",
"messages.deleteTopicHistory",
"messages.toggleTodoCompleted", "messages.toggleTodoCompleted",
"messages.appendTodoList", "messages.appendTodoList",
"updates.getState", "updates.getState",
@ -372,12 +378,6 @@
"stats.getBroadcastRevenueWithdrawalUrl", "stats.getBroadcastRevenueWithdrawalUrl",
"channels.deactivateAllUsernames", "channels.deactivateAllUsernames",
"channels.toggleForum", "channels.toggleForum",
"channels.createForumTopic",
"channels.getForumTopics",
"channels.getForumTopicsByID",
"channels.editForumTopic",
"channels.updatePinnedForumTopic",
"channels.deleteTopicHistory",
"channels.toggleParticipantsHidden", "channels.toggleParticipantsHidden",
"channels.toggleViewForumAsMessages", "channels.toggleViewForumAsMessages",
"photos.uploadContactProfilePhoto", "photos.uploadContactProfilePhoto",

View File

@ -85,7 +85,7 @@ storage.fileMp4#b3cea0e4 = storage.FileType;
storage.fileWebp#1081464c = storage.FileType; storage.fileWebp#1081464c = storage.FileType;
userEmpty#d3bc4b7a id:long = User; userEmpty#d3bc4b7a id:long = User;
user#20b1422 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 bot_has_main_app:flags2.13?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<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor bot_active_users:flags2.12?int bot_verification_icon:flags2.14?long send_paid_messages_stars:flags2.15?long = User; user#20b1422 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 bot_has_main_app:flags2.13?true bot_forum_view:flags2.16?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<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor bot_active_users:flags2.12?int bot_verification_icon:flags2.14?long send_paid_messages_stars:flags2.15?long = User;
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto; 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; userProfilePhoto#82d1f706 flags:# has_video:flags.0?true personal:flags.2?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = UserProfilePhoto;
@ -167,12 +167,12 @@ messageActionGroupCall#7a0d7f42 flags:# call:InputGroupCall duration:flags.0?int
messageActionInviteToGroupCall#502f92f7 call:InputGroupCall users:Vector<long> = MessageAction; messageActionInviteToGroupCall#502f92f7 call:InputGroupCall users:Vector<long> = MessageAction;
messageActionSetMessagesTTL#3c134d7b flags:# period:int auto_setting_from:flags.0?long = MessageAction; messageActionSetMessagesTTL#3c134d7b flags:# period:int auto_setting_from:flags.0?long = MessageAction;
messageActionGroupCallScheduled#b3a07661 call:InputGroupCall schedule_date:int = MessageAction; messageActionGroupCallScheduled#b3a07661 call:InputGroupCall schedule_date:int = MessageAction;
messageActionSetChatTheme#aa786345 emoticon:string = MessageAction; messageActionSetChatTheme#b91bbd3a theme:ChatTheme = MessageAction;
messageActionChatJoinedByRequest#ebbca3cb = MessageAction; messageActionChatJoinedByRequest#ebbca3cb = MessageAction;
messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction; messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction;
messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction; messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction;
messageActionGiftPremium#6c6274fa flags:# currency:string amount:long months:int crypto_currency:flags.0?string crypto_amount:flags.0?long message:flags.1?TextWithEntities = MessageAction; messageActionGiftPremium#6c6274fa flags:# currency:string amount:long months:int crypto_currency:flags.0?string crypto_amount:flags.0?long message:flags.1?TextWithEntities = MessageAction;
messageActionTopicCreate#d999256 flags:# title:string icon_color:int icon_emoji_id:flags.0?long = MessageAction; messageActionTopicCreate#d999256 flags:# title_missing:flags.1?true title:string icon_color:int icon_emoji_id:flags.0?long = MessageAction;
messageActionTopicEdit#c0944820 flags:# title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = MessageAction; messageActionTopicEdit#c0944820 flags:# title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = MessageAction;
messageActionSuggestProfilePhoto#57de635e photo:Photo = MessageAction; messageActionSuggestProfilePhoto#57de635e photo:Photo = MessageAction;
messageActionRequestedPeer#31518e9b button_id:int peers:Vector<Peer> = MessageAction; messageActionRequestedPeer#31518e9b button_id:int peers:Vector<Peer> = MessageAction;
@ -186,7 +186,7 @@ messageActionPaymentRefunded#41b3e202 flags:# peer:Peer currency:string total_am
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; 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; messageActionPrizeStars#b00c47a2 flags:# unclaimed:flags.0?true stars:long transaction_id:string boost_peer:Peer giveaway_msg_id:int = MessageAction;
messageActionStarGift#f24de7fa flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true upgraded:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true prepaid_upgrade:flags.13?true upgrade_separate:flags.16?true gift:StarGift message:flags.1?TextWithEntities convert_stars:flags.4?long upgrade_msg_id:flags.5?int upgrade_stars:flags.8?long from_id:flags.11?Peer peer:flags.12?Peer saved_id:flags.12?long prepaid_upgrade_hash:flags.14?string gift_msg_id:flags.15?int = MessageAction; messageActionStarGift#f24de7fa flags:# name_hidden:flags.0?true saved:flags.2?true converted:flags.3?true upgraded:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true prepaid_upgrade:flags.13?true upgrade_separate:flags.16?true gift:StarGift message:flags.1?TextWithEntities convert_stars:flags.4?long upgrade_msg_id:flags.5?int upgrade_stars:flags.8?long from_id:flags.11?Peer peer:flags.12?Peer saved_id:flags.12?long prepaid_upgrade_hash:flags.14?string gift_msg_id:flags.15?int = MessageAction;
messageActionStarGiftUnique#34f762f3 flags:# upgrade:flags.0?true transferred:flags.1?true saved:flags.2?true refunded:flags.5?true prepaid_upgrade:flags.11?true gift:StarGift can_export_at:flags.3?int transfer_stars:flags.4?long from_id:flags.6?Peer peer:flags.7?Peer saved_id:flags.7?long resale_amount:flags.8?StarsAmount can_transfer_at:flags.9?int can_resell_at:flags.10?int = MessageAction; messageActionStarGiftUnique#95728543 flags:# upgrade:flags.0?true transferred:flags.1?true saved:flags.2?true refunded:flags.5?true prepaid_upgrade:flags.11?true assigned:flags.13?true gift:StarGift can_export_at:flags.3?int transfer_stars:flags.4?long from_id:flags.6?Peer peer:flags.7?Peer saved_id:flags.7?long resale_amount:flags.8?StarsAmount can_transfer_at:flags.9?int can_resell_at:flags.10?int drop_original_details_stars:flags.12?long = MessageAction;
messageActionPaidMessagesRefunded#ac1f1fcd count:int stars:long = MessageAction; messageActionPaidMessagesRefunded#ac1f1fcd count:int stars:long = MessageAction;
messageActionPaidMessagesPrice#84b88578 flags:# broadcast_messages_allowed:flags.0?true stars:long = MessageAction; messageActionPaidMessagesPrice#84b88578 flags:# broadcast_messages_allowed:flags.0?true stars:long = MessageAction;
messageActionConferenceCall#2ffe2f7a flags:# missed:flags.0?true active:flags.1?true video:flags.4?true call_id:long duration:flags.2?int other_participants:flags.3?Vector<Peer> = MessageAction; messageActionConferenceCall#2ffe2f7a flags:# missed:flags.0?true active:flags.1?true video:flags.4?true call_id:long duration:flags.2?int other_participants:flags.3?Vector<Peer> = MessageAction;
@ -196,6 +196,7 @@ messageActionSuggestedPostApproval#ee7a1596 flags:# rejected:flags.0?true balanc
messageActionSuggestedPostSuccess#95ddcf69 price:StarsAmount = MessageAction; messageActionSuggestedPostSuccess#95ddcf69 price:StarsAmount = MessageAction;
messageActionSuggestedPostRefund#69f916f8 flags:# payer_initiated:flags.0?true = MessageAction; messageActionSuggestedPostRefund#69f916f8 flags:# payer_initiated:flags.0?true = MessageAction;
messageActionGiftTon#a8a3c699 flags:# currency:string amount:long crypto_currency:string crypto_amount:long transaction_id:flags.0?string = MessageAction; messageActionGiftTon#a8a3c699 flags:# currency:string amount:long crypto_currency:string crypto_amount:long transaction_id:flags.0?string = MessageAction;
messageActionSuggestBirthday#2c8f2a25 birthday:Birthday = 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; 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; 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;
@ -215,7 +216,7 @@ geoPoint#b2a2f663 flags:# long:double lat:double access_hash:long accuracy_radiu
auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode; auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;
auth.sentCodeSuccess#2390fe44 authorization:auth.Authorization = auth.SentCode; auth.sentCodeSuccess#2390fe44 authorization:auth.Authorization = auth.SentCode;
auth.sentCodePaymentRequired#d7a2fcf9 store_product:string phone_code_hash:string support_email_address:string support_email_subject:string = auth.SentCode; auth.sentCodePaymentRequired#e0955a3c store_product:string phone_code_hash:string support_email_address:string support_email_subject:string currency:string amount:long = auth.SentCode;
auth.authorization#2ea2c0d4 flags:# setup_password_required:flags.1?true otherwise_relogin_days:flags.1?int tmp_sessions:flags.0?int future_auth_token:flags.2?bytes user:User = auth.Authorization; auth.authorization#2ea2c0d4 flags:# setup_password_required:flags.1?true otherwise_relogin_days:flags.1?int tmp_sessions:flags.0?int future_auth_token:flags.2?bytes user:User = auth.Authorization;
auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization; auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization;
@ -248,7 +249,7 @@ inputReportReasonFake#f5ddd6e7 = ReportReason;
inputReportReasonIllegalDrugs#a8eb2be = ReportReason; inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason; inputReportReasonPersonalDetails#9ec7863d = ReportReason;
userFull#3fd81e28 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 can_view_revenue:flags2.9?true bot_can_manage_emoji_status:flags2.10?true display_gifts_button:flags2.16?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 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 starref_program:flags2.11?StarRefProgram bot_verification:flags2.12?BotVerification send_paid_messages_stars:flags2.14?long disallowed_gifts:flags2.15?DisallowedGiftsSettings stars_rating:flags2.17?StarsRating stars_my_pending_rating:flags2.18?StarsRating stars_my_pending_rating_date:flags2.18?int main_tab:flags2.20?ProfileTab saved_music:flags2.21?Document = UserFull; userFull#a02bc13e 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 can_view_revenue:flags2.9?true bot_can_manage_emoji_status:flags2.10?true display_gifts_button:flags2.16?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:flags.15?ChatTheme private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights 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 starref_program:flags2.11?StarRefProgram bot_verification:flags2.12?BotVerification send_paid_messages_stars:flags2.14?long disallowed_gifts:flags2.15?DisallowedGiftsSettings stars_rating:flags2.17?StarsRating stars_my_pending_rating:flags2.18?StarsRating stars_my_pending_rating_date:flags2.18?int main_tab:flags2.20?ProfileTab saved_music:flags2.21?Document note:flags2.22?TextWithEntities = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact; contact#145ade0b user_id:long mutual:Bool = Contact;
@ -268,8 +269,8 @@ messages.dialogs#15ba6c40 dialogs:Vector<Dialog> messages:Vector<Message> chats:
messages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs; messages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs;
messages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs; messages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs;
messages.messages#8c718e87 messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; messages.messages#1d73e7ea messages:Vector<Message> topics:Vector<ForumTopic> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.messagesSlice#762b263d flags:# inexact:flags.1?true count:int next_rate:flags.0?int offset_id_offset:flags.2?int search_flood:flags.3?SearchPostsFlood messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; messages.messagesSlice#5f206716 flags:# inexact:flags.1?true count:int next_rate:flags.0?int offset_id_offset:flags.2?int search_flood:flags.3?SearchPostsFlood messages:Vector<Message> topics:Vector<ForumTopic> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.channelMessages#c776ba4e flags:# inexact:flags.1?true pts:int count:int offset_id_offset:flags.2?int messages:Vector<Message> topics:Vector<ForumTopic> chats:Vector<Chat> users:Vector<User> = messages.Messages; messages.channelMessages#c776ba4e flags:# inexact:flags.1?true pts:int count:int offset_id_offset:flags.2?int messages:Vector<Message> topics:Vector<ForumTopic> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.messagesNotModified#74535f21 count:int = messages.Messages; messages.messagesNotModified#74535f21 count:int = messages.Messages;
@ -301,7 +302,7 @@ inputMessagesFilterPinned#1bb00451 = MessagesFilter;
updateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update; updateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update;
updateMessageID#4e90bfd6 id:int random_id:long = Update; updateMessageID#4e90bfd6 id:int random_id:long = Update;
updateDeleteMessages#a20db0e5 messages:Vector<int> pts:int pts_count:int = Update; updateDeleteMessages#a20db0e5 messages:Vector<int> pts:int pts_count:int = Update;
updateUserTyping#c01e857f user_id:long action:SendMessageAction = Update; updateUserTyping#2a17bf5c flags:# user_id:long top_msg_id:flags.0?int action:SendMessageAction = Update;
updateChatUserTyping#83487af0 chat_id:long from_id:Peer action:SendMessageAction = Update; updateChatUserTyping#83487af0 chat_id:long from_id:Peer action:SendMessageAction = Update;
updateChatParticipants#7761198 participants:ChatParticipants = Update; updateChatParticipants#7761198 participants:ChatParticipants = Update;
updateUserStatus#e5bdf8de user_id:long status:UserStatus = Update; updateUserStatus#e5bdf8de user_id:long status:UserStatus = Update;
@ -318,7 +319,7 @@ updateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings
updateServiceNotification#ebe46819 flags:# popup:flags.0?true invert_media:flags.2?true inbox_date:flags.1?int type:string message:string media:MessageMedia entities:Vector<MessageEntity> = Update; updateServiceNotification#ebe46819 flags:# popup:flags.0?true invert_media:flags.2?true inbox_date:flags.1?int type:string message:string media:MessageMedia entities:Vector<MessageEntity> = Update;
updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update; updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update;
updateUserPhone#5492a13 user_id:long phone:string = Update; updateUserPhone#5492a13 user_id:long phone:string = Update;
updateReadHistoryInbox#9c974fdf flags:# folder_id:flags.0?int peer:Peer max_id:int still_unread_count:int pts:int pts_count:int = Update; updateReadHistoryInbox#9e84bc99 flags:# folder_id:flags.0?int peer:Peer top_msg_id:flags.1?int max_id:int still_unread_count:int pts:int pts_count:int = Update;
updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update; updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update;
updateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update; updateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update;
updateReadMessagesContents#f8227181 flags:# messages:Vector<int> pts:int pts_count:int date:flags.0?int = Update; updateReadMessagesContents#f8227181 flags:# messages:Vector<int> pts:int pts_count:int date:flags.0?int = Update;
@ -405,8 +406,6 @@ updateRecentEmojiStatuses#30f443db = Update;
updateRecentReactions#6f7863f4 = Update; updateRecentReactions#6f7863f4 = Update;
updateMoveStickerSetToTop#86fccf85 flags:# masks:flags.0?true emojis:flags.1?true stickerset:long = Update; updateMoveStickerSetToTop#86fccf85 flags:# masks:flags.0?true emojis:flags.1?true stickerset:long = Update;
updateMessageExtendedMedia#d5a41724 peer:Peer msg_id:int extended_media:Vector<MessageExtendedMedia> = Update; updateMessageExtendedMedia#d5a41724 peer:Peer msg_id:int extended_media:Vector<MessageExtendedMedia> = Update;
updateChannelPinnedTopic#192efbe3 flags:# pinned:flags.0?true channel_id:long topic_id:int = Update;
updateChannelPinnedTopics#fe198602 flags:# channel_id:long order:flags.0?Vector<int> = Update;
updateUser#20529438 user_id:long = Update; updateUser#20529438 user_id:long = Update;
updateAutoSaveSettings#ec05b097 = Update; updateAutoSaveSettings#ec05b097 = Update;
updateStory#75b3b798 peer:Peer story:StoryItem = Update; updateStory#75b3b798 peer:Peer story:StoryItem = Update;
@ -443,6 +442,10 @@ updateGroupCallChainBlocks#a477288f call:InputGroupCall sub_chain_id:int blocks:
updateReadMonoForumInbox#77b0e372 channel_id:long saved_peer_id:Peer read_max_id:int = Update; updateReadMonoForumInbox#77b0e372 channel_id:long saved_peer_id:Peer read_max_id:int = Update;
updateReadMonoForumOutbox#a4a79376 channel_id:long saved_peer_id:Peer read_max_id:int = Update; updateReadMonoForumOutbox#a4a79376 channel_id:long saved_peer_id:Peer read_max_id:int = Update;
updateMonoForumNoPaidException#9f812b08 flags:# exception:flags.0?true channel_id:long saved_peer_id:Peer = Update; updateMonoForumNoPaidException#9f812b08 flags:# exception:flags.0?true channel_id:long saved_peer_id:Peer = Update;
updateGroupCallMessage#78c314e0 call:InputGroupCall from_id:Peer random_id:long message:TextWithEntities = Update;
updateGroupCallEncryptedMessage#c957a766 call:InputGroupCall from_id:Peer encrypted_message:bytes = Update;
updatePinnedForumTopic#683b2c52 flags:# pinned:flags.0?true peer:Peer topic_id:int = Update;
updatePinnedForumTopics#def143d0 flags:# peer:Peer order:flags.0?Vector<int> = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State; updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
@ -535,6 +538,7 @@ sendMessageHistoryImportAction#dbda9246 progress:int = SendMessageAction;
sendMessageChooseStickerAction#b05ac6b1 = SendMessageAction; sendMessageChooseStickerAction#b05ac6b1 = SendMessageAction;
sendMessageEmojiInteraction#25972bcb emoticon:string msg_id:int interaction:DataJSON = SendMessageAction; sendMessageEmojiInteraction#25972bcb emoticon:string msg_id:int interaction:DataJSON = SendMessageAction;
sendMessageEmojiInteractionSeen#b665902e emoticon:string = SendMessageAction; sendMessageEmojiInteractionSeen#b665902e emoticon:string = SendMessageAction;
sendMessageTextDraftAction#376d975c random_id:long text:TextWithEntities = SendMessageAction;
contacts.found#b3134d9d my_results:Vector<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found; contacts.found#b3134d9d my_results:Vector<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found;
@ -1355,7 +1359,7 @@ peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked;
stats.messageStats#7fe91c14 views_graph:StatsGraph reactions_by_emotion_graph:StatsGraph = stats.MessageStats; stats.messageStats#7fe91c14 views_graph:StatsGraph reactions_by_emotion_graph:StatsGraph = stats.MessageStats;
groupCallDiscarded#7780bcb4 id:long access_hash:long duration:int = GroupCall; groupCallDiscarded#7780bcb4 id:long access_hash:long duration:int = GroupCall;
groupCall#553b0ba1 flags:# join_muted:flags.1?true can_change_join_muted:flags.2?true join_date_asc:flags.6?true schedule_start_subscribed:flags.8?true can_start_video:flags.9?true record_video_active:flags.11?true rtmp_stream:flags.12?true listeners_hidden:flags.13?true conference:flags.14?true creator:flags.15?true id:long access_hash:long participants_count:int title:flags.3?string stream_dc_id:flags.4?int record_start_date:flags.5?int schedule_date:flags.7?int unmuted_video_count:flags.10?int unmuted_video_limit:int version:int invite_link:flags.16?string = GroupCall; groupCall#553b0ba1 flags:# join_muted:flags.1?true can_change_join_muted:flags.2?true join_date_asc:flags.6?true schedule_start_subscribed:flags.8?true can_start_video:flags.9?true record_video_active:flags.11?true rtmp_stream:flags.12?true listeners_hidden:flags.13?true conference:flags.14?true creator:flags.15?true messages_enabled:flags.17?true can_change_messages_enabled:flags.18?true min:flags.19?true id:long access_hash:long participants_count:int title:flags.3?string stream_dc_id:flags.4?int record_start_date:flags.5?int schedule_date:flags.7?int unmuted_video_count:flags.10?int unmuted_video_limit:int version:int invite_link:flags.16?string = GroupCall;
inputGroupCall#d8aa840f id:long access_hash:long = InputGroupCall; inputGroupCall#d8aa840f id:long access_hash:long = InputGroupCall;
inputGroupCallSlug#fe06823f slug:string = InputGroupCall; inputGroupCallSlug#fe06823f slug:string = InputGroupCall;
@ -1417,6 +1421,12 @@ account.resetPasswordFailedWait#e3779861 retry_date:int = account.ResetPasswordR
account.resetPasswordRequestedWait#e9effc7d until_date:int = account.ResetPasswordResult; account.resetPasswordRequestedWait#e9effc7d until_date:int = account.ResetPasswordResult;
account.resetPasswordOk#e926d63e = account.ResetPasswordResult; account.resetPasswordOk#e926d63e = account.ResetPasswordResult;
chatTheme#c3dffc04 emoticon:string = ChatTheme;
chatThemeUniqueGift#3458f9c8 gift:StarGift theme_settings:Vector<ThemeSettings> = ChatTheme;
account.chatThemesNotModified#e011e1c4 = account.ChatThemes;
account.chatThemes#be098173 flags:# hash:long themes:Vector<ChatTheme> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = account.ChatThemes;
sponsoredMessage#7dbf8673 flags:# recommended:flags.5?true can_report:flags.12?true random_id:bytes url:string title:string message:string entities:flags.1?Vector<MessageEntity> photo:flags.6?Photo media:flags.14?MessageMedia color:flags.13?PeerColor button_text:string sponsor_info:flags.7?string additional_info:flags.8?string min_display_duration:flags.15?int max_display_duration:flags.15?int = SponsoredMessage; sponsoredMessage#7dbf8673 flags:# recommended:flags.5?true can_report:flags.12?true random_id:bytes url:string title:string message:string entities:flags.1?Vector<MessageEntity> photo:flags.6?Photo media:flags.14?MessageMedia color:flags.13?PeerColor button_text:string sponsor_info:flags.7?string additional_info:flags.8?string min_display_duration:flags.15?int max_display_duration:flags.15?int = SponsoredMessage;
messages.sponsoredMessages#ffda656d flags:# posts_between:flags.0?int start_delay:flags.1?int between_delay:flags.2?int messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages; messages.sponsoredMessages#ffda656d flags:# posts_between:flags.0?int start_delay:flags.1?int between_delay:flags.2?int messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages;
@ -1505,6 +1515,8 @@ inputInvoicePremiumGiftStars#dabab2ef flags:# user_id:InputUser months:int messa
inputInvoiceBusinessBotTransferStars#f4997e42 bot:InputUser stars:long = InputInvoice; inputInvoiceBusinessBotTransferStars#f4997e42 bot:InputUser stars:long = InputInvoice;
inputInvoiceStarGiftResale#c39f5324 flags:# ton:flags.0?true slug:string to_id:InputPeer = InputInvoice; inputInvoiceStarGiftResale#c39f5324 flags:# ton:flags.0?true slug:string to_id:InputPeer = InputInvoice;
inputInvoiceStarGiftPrepaidUpgrade#9a0b48b8 peer:InputPeer hash:string = InputInvoice; inputInvoiceStarGiftPrepaidUpgrade#9a0b48b8 peer:InputPeer hash:string = InputInvoice;
inputInvoicePremiumAuthCode#3e77f614 purpose:InputStorePaymentPurpose = InputInvoice;
inputInvoiceStarGiftDropOriginalDetails#923d8d1 stargift:InputSavedStarGift = InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice; payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
@ -1566,7 +1578,7 @@ stickerKeyword#fcfeb29c document_id:long keyword:Vector<string> = StickerKeyword
username#b4073647 flags:# editable:flags.0?true active:flags.1?true username:string = Username; username#b4073647 flags:# editable:flags.0?true active:flags.1?true username:string = Username;
forumTopicDeleted#23f109b id:int = ForumTopic; forumTopicDeleted#23f109b id:int = ForumTopic;
forumTopic#71701da9 flags:# my:flags.1?true closed:flags.2?true pinned:flags.3?true short:flags.5?true hidden:flags.6?true id:int date:int title:string icon_color:int icon_emoji_id:flags.0?long top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int from_id:Peer notify_settings:PeerNotifySettings draft:flags.4?DraftMessage = ForumTopic; forumTopic#cdff0eca flags:# my:flags.1?true closed:flags.2?true pinned:flags.3?true short:flags.5?true hidden:flags.6?true title_missing:flags.7?true id:int date:int peer:Peer title:string icon_color:int icon_emoji_id:flags.0?long top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int from_id:Peer notify_settings:PeerNotifySettings draft:flags.4?DraftMessage = ForumTopic;
messages.forumTopics#367617d3 flags:# order_by_create_date:flags.0?true count:int topics:Vector<ForumTopic> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> pts:int = messages.ForumTopics; messages.forumTopics#367617d3 flags:# order_by_create_date:flags.0?true count:int topics:Vector<ForumTopic> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> pts:int = messages.ForumTopics;
@ -1710,6 +1722,8 @@ publicForwardStory#edf3add0 peer:Peer story:StoryItem = PublicForward;
stats.publicForwards#93037e20 flags:# count:int forwards:Vector<PublicForward> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = stats.PublicForwards; stats.publicForwards#93037e20 flags:# count:int forwards:Vector<PublicForward> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = stats.PublicForwards;
peerColor#b54b5acf flags:# color:flags.0?int background_emoji_id:flags.1?long = PeerColor; peerColor#b54b5acf flags:# color:flags.0?int background_emoji_id:flags.1?long = PeerColor;
peerColorCollectible#b9c0639a flags:# collectible_id:long gift_emoji_id:long background_emoji_id:long accent_color:int colors:Vector<int> dark_accent_color:flags.0?int dark_colors:flags.1?Vector<int> = PeerColor;
inputPeerColorCollectible#b8ea86a9 collectible_id:long = PeerColor;
help.peerColorSet#26219a58 colors:Vector<int> = help.PeerColorSet; help.peerColorSet#26219a58 colors:Vector<int> = help.PeerColorSet;
help.peerColorProfileSet#767d61eb palette_colors:Vector<int> bg_colors:Vector<int> story_colors:Vector<int> = help.PeerColorSet; help.peerColorProfileSet#767d61eb palette_colors:Vector<int> bg_colors:Vector<int> story_colors:Vector<int> = help.PeerColorSet;
@ -1854,7 +1868,7 @@ starsTransactionPeerAPI#f9677aad = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption; starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
starsTransaction#13659eb0 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true stargift_upgrade:flags.18?true business_transfer:flags.21?true stargift_resale:flags.22?true posts_search:flags.24?true stargift_prepaid_upgrade:flags.25?true id:string amount:StarsAmount 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 floodskip_number:flags.15?int starref_commission_permille:flags.16?int starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount paid_messages:flags.19?int premium_gift_months:flags.20?int ads_proceeds_from_date:flags.23?int ads_proceeds_to_date:flags.23?int = StarsTransaction; starsTransaction#13659eb0 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true stargift_upgrade:flags.18?true business_transfer:flags.21?true stargift_resale:flags.22?true posts_search:flags.24?true stargift_prepaid_upgrade:flags.25?true stargift_drop_original_details:flags.26?true id:string amount:StarsAmount 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 floodskip_number:flags.15?int starref_commission_permille:flags.16?int starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount paid_messages:flags.19?int premium_gift_months:flags.20?int ads_proceeds_from_date:flags.23?int ads_proceeds_to_date:flags.23?int = StarsTransaction;
payments.starsStatus#6c9ce8ed flags:# balance:StarsAmount 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; payments.starsStatus#6c9ce8ed flags:# balance:StarsAmount 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;
@ -1892,8 +1906,8 @@ 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; starsGiveawayWinnersOption#54236209 flags:# default:flags.0?true users:int per_user_stars:long = StarsGiveawayWinnersOption;
starGift#80ac53c3 flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true require_premium:flags.7?true limited_per_user:flags.8?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int availability_resale:flags.4?long convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long resell_min_stars:flags.4?long title:flags.5?string released_by:flags.6?Peer per_user_total:flags.8?int per_user_remains:flags.8?int locked_until_date:flags.9?int = StarGift; starGift#80ac53c3 flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true require_premium:flags.7?true limited_per_user:flags.8?true peer_color_available:flags.10?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int availability_resale:flags.4?long convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long resell_min_stars:flags.4?long title:flags.5?string released_by:flags.6?Peer per_user_total:flags.8?int per_user_remains:flags.8?int locked_until_date:flags.9?int = StarGift;
starGiftUnique#26a5553e flags:# require_premium:flags.6?true resale_ton_only:flags.7?true id:long gift_id:long title:string slug:string num:int owner_id:flags.0?Peer owner_name:flags.1?string owner_address:flags.2?string attributes:Vector<StarGiftAttribute> availability_issued:int availability_total:int gift_address:flags.3?string resell_amount:flags.4?Vector<StarsAmount> released_by:flags.5?Peer value_amount:flags.8?long value_currency:flags.8?string = StarGift; starGiftUnique#b0bf741b flags:# require_premium:flags.6?true resale_ton_only:flags.7?true theme_available:flags.9?true id:long gift_id:long title:string slug:string num:int owner_id:flags.0?Peer owner_name:flags.1?string owner_address:flags.2?string attributes:Vector<StarGiftAttribute> availability_issued:int availability_total:int gift_address:flags.3?string resell_amount:flags.4?Vector<StarsAmount> released_by:flags.5?Peer value_amount:flags.8?long value_currency:flags.8?string theme_peer:flags.10?Peer peer_color:flags.11?PeerColor host_id:flags.12?Peer = StarGift;
payments.starGiftsNotModified#a388a368 = payments.StarGifts; payments.starGiftsNotModified#a388a368 = payments.StarGifts;
payments.starGifts#2ed82995 hash:int gifts:Vector<StarGift> chats:Vector<Chat> users:Vector<User> = payments.StarGifts; payments.starGifts#2ed82995 hash:int gifts:Vector<StarGift> chats:Vector<Chat> users:Vector<User> = payments.StarGifts;
@ -1933,7 +1947,7 @@ starGiftAttributePattern#13acff19 name:string document:Document rarity_permille:
starGiftAttributeBackdrop#d93d859c name:string backdrop_id:int center_color:int edge_color:int pattern_color:int text_color:int rarity_permille:int = StarGiftAttribute; starGiftAttributeBackdrop#d93d859c name:string backdrop_id:int center_color:int edge_color:int pattern_color:int text_color:int rarity_permille:int = StarGiftAttribute;
starGiftAttributeOriginalDetails#e0bff26c flags:# sender_id:flags.0?Peer recipient_id:Peer date:int message:flags.1?TextWithEntities = StarGiftAttribute; starGiftAttributeOriginalDetails#e0bff26c flags:# sender_id:flags.0?Peer recipient_id:Peer date:int message:flags.1?TextWithEntities = StarGiftAttribute;
payments.starGiftUpgradePreview#167bd90b sample_attributes:Vector<StarGiftAttribute> = payments.StarGiftUpgradePreview; payments.starGiftUpgradePreview#3de1dfed sample_attributes:Vector<StarGiftAttribute> prices:Vector<StarGiftUpgradePrice> next_prices:Vector<StarGiftUpgradePrice> = payments.StarGiftUpgradePreview;
users.users#62d706b8 users:Vector<User> = users.Users; users.users#62d706b8 users:Vector<User> = users.Users;
users.usersSlice#315a4974 count:int users:Vector<User> = users.Users; users.usersSlice#315a4974 count:int users:Vector<User> = users.Users;
@ -1942,7 +1956,7 @@ payments.uniqueStarGift#416c56e8 gift:StarGift chats:Vector<Chat> users:Vector<U
messages.webPagePreview#8c9a88ac media:MessageMedia chats:Vector<Chat> users:Vector<User> = messages.WebPagePreview; messages.webPagePreview#8c9a88ac media:MessageMedia chats:Vector<Chat> users:Vector<User> = messages.WebPagePreview;
savedStarGift#19a9b572 flags:# name_hidden:flags.0?true unsaved:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true pinned_to_top:flags.12?true upgrade_separate:flags.17?true from_id:flags.1?Peer date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int saved_id:flags.11?long convert_stars:flags.4?long upgrade_stars:flags.6?long can_export_at:flags.7?int transfer_stars:flags.8?long can_transfer_at:flags.13?int can_resell_at:flags.14?int collection_id:flags.15?Vector<int> prepaid_upgrade_hash:flags.16?string = SavedStarGift; savedStarGift#8983a452 flags:# name_hidden:flags.0?true unsaved:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true pinned_to_top:flags.12?true upgrade_separate:flags.17?true from_id:flags.1?Peer date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int saved_id:flags.11?long convert_stars:flags.4?long upgrade_stars:flags.6?long can_export_at:flags.7?int transfer_stars:flags.8?long can_transfer_at:flags.13?int can_resell_at:flags.14?int collection_id:flags.15?Vector<int> prepaid_upgrade_hash:flags.16?string drop_original_details_stars:flags.18?long = SavedStarGift;
payments.savedStarGifts#95f389b1 flags:# count:int chat_notifications_enabled:flags.1?Bool gifts:Vector<SavedStarGift> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.SavedStarGifts; payments.savedStarGifts#95f389b1 flags:# count:int chat_notifications_enabled:flags.1?Bool gifts:Vector<SavedStarGift> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.SavedStarGifts;
@ -2025,6 +2039,12 @@ account.savedMusicIds#998d6636 ids:Vector<long> = account.SavedMusicIds;
payments.checkCanSendGiftResultOk#374fa7ad = payments.CheckCanSendGiftResult; payments.checkCanSendGiftResultOk#374fa7ad = payments.CheckCanSendGiftResult;
payments.checkCanSendGiftResultFail#d5e58274 reason:TextWithEntities = payments.CheckCanSendGiftResult; payments.checkCanSendGiftResultFail#d5e58274 reason:TextWithEntities = payments.CheckCanSendGiftResult;
inputChatThemeEmpty#83268483 = InputChatTheme;
inputChatTheme#c93de95c emoticon:string = InputChatTheme;
inputChatThemeUniqueGift#87e5dfe4 slug:string = InputChatTheme;
starGiftUpgradePrice#99ea331d date:int upgrade_stars:long = StarGiftUpgradePrice;
---functions--- ---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@ -2062,6 +2082,7 @@ auth.importWebTokenAuthorization#2db873a9 api_id:int api_hash:string web_auth_to
auth.requestFirebaseSms#8e39261e flags:# phone_number:string phone_code_hash:string safety_net_token:flags.0?string play_integrity_token:flags.2?string ios_push_secret:flags.1?string = Bool; auth.requestFirebaseSms#8e39261e flags:# phone_number:string phone_code_hash:string safety_net_token:flags.0?string play_integrity_token:flags.2?string ios_push_secret:flags.1?string = Bool;
auth.resetLoginEmail#7e960193 phone_number:string phone_code_hash:string = auth.SentCode; auth.resetLoginEmail#7e960193 phone_number:string phone_code_hash:string = auth.SentCode;
auth.reportMissingCode#cb9deff6 phone_number:string phone_code_hash:string mnc:string = Bool; auth.reportMissingCode#cb9deff6 phone_number:string phone_code_hash:string mnc:string = Bool;
auth.checkPaidAuth#56e59f9c phone_number:string phone_code_hash:string form_id:long = auth.SentCode;
account.registerDevice#ec86017a flags:# no_muted:flags.0?true token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector<long> = Bool; account.registerDevice#ec86017a flags:# no_muted:flags.0?true token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector<long> = Bool;
account.unregisterDevice#6a0d3206 token_type:int token:string other_uids:Vector<long> = Bool; account.unregisterDevice#6a0d3206 token_type:int token:string other_uids:Vector<long> = Bool;
@ -2151,7 +2172,7 @@ account.getAutoSaveSettings#adcbbcda = account.AutoSaveSettings;
account.saveAutoSaveSettings#d69b8361 flags:# users:flags.0?true chats:flags.1?true broadcasts:flags.2?true peer:flags.3?InputPeer settings:AutoSaveSettings = Bool; account.saveAutoSaveSettings#d69b8361 flags:# users:flags.0?true chats:flags.1?true broadcasts:flags.2?true peer:flags.3?InputPeer settings:AutoSaveSettings = Bool;
account.deleteAutoSaveExceptions#53bc0020 = Bool; account.deleteAutoSaveExceptions#53bc0020 = Bool;
account.invalidateSignInCodes#ca8ae8ba codes:Vector<string> = Bool; account.invalidateSignInCodes#ca8ae8ba codes:Vector<string> = Bool;
account.updateColor#7cefa15d flags:# for_profile:flags.1?true color:flags.2?int background_emoji_id:flags.0?long = Bool; account.updateColor#684d214e flags:# for_profile:flags.1?true color:flags.2?PeerColor = Bool;
account.getDefaultBackgroundEmojis#a60ab9ce hash:long = EmojiList; account.getDefaultBackgroundEmojis#a60ab9ce hash:long = EmojiList;
account.getChannelDefaultEmojiStatuses#7727a7d5 hash:long = account.EmojiStatuses; account.getChannelDefaultEmojiStatuses#7727a7d5 hash:long = account.EmojiStatuses;
account.getChannelRestrictedStatusEmojis#35a9e0d5 hash:long = EmojiList; account.getChannelRestrictedStatusEmojis#35a9e0d5 hash:long = EmojiList;
@ -2181,6 +2202,7 @@ account.toggleNoPaidMessagesException#fe2eda76 flags:# refund_charged:flags.0?tr
account.setMainProfileTab#5dee78b0 tab:ProfileTab = Bool; account.setMainProfileTab#5dee78b0 tab:ProfileTab = Bool;
account.saveMusic#b26732a9 flags:# unsave:flags.0?true id:InputDocument after_id:flags.1?InputDocument = Bool; account.saveMusic#b26732a9 flags:# unsave:flags.0?true id:InputDocument after_id:flags.1?InputDocument = Bool;
account.getSavedMusicIds#e09d5faf hash:long = account.SavedMusicIds; account.getSavedMusicIds#e09d5faf hash:long = account.SavedMusicIds;
account.getUniqueGiftChatThemes#e42ce9c9 offset:string limit:int hash:long = account.ChatThemes;
users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>; users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
users.getFullUser#b60f5918 id:InputUser = users.UserFull; users.getFullUser#b60f5918 id:InputUser = users.UserFull;
@ -2188,6 +2210,7 @@ users.setSecureValueErrors#90c894b5 id:InputUser errors:Vector<SecureValueError>
users.getRequirementsToContact#d89a83a3 id:Vector<InputUser> = Vector<RequirementToContact>; users.getRequirementsToContact#d89a83a3 id:Vector<InputUser> = Vector<RequirementToContact>;
users.getSavedMusic#788d7fe3 id:InputUser offset:int limit:int hash:long = users.SavedMusic; users.getSavedMusic#788d7fe3 id:InputUser offset:int limit:int hash:long = users.SavedMusic;
users.getSavedMusicByID#7573a4e9 id:InputUser documents:Vector<InputDocument> = users.SavedMusic; users.getSavedMusicByID#7573a4e9 id:InputUser documents:Vector<InputDocument> = users.SavedMusic;
users.suggestBirthday#fc533372 id:InputUser birthday:Birthday = Updates;
contacts.getContactIDs#7adc669d hash:long = Vector<int>; contacts.getContactIDs#7adc669d hash:long = Vector<int>;
contacts.getStatuses#c4a353ee = Vector<ContactStatus>; contacts.getStatuses#c4a353ee = Vector<ContactStatus>;
@ -2205,7 +2228,7 @@ contacts.resetTopPeerRating#1ae373ac category:TopPeerCategory peer:InputPeer = B
contacts.resetSaved#879537f1 = Bool; contacts.resetSaved#879537f1 = Bool;
contacts.getSaved#82f1e39f = Vector<SavedContact>; contacts.getSaved#82f1e39f = Vector<SavedContact>;
contacts.toggleTopPeers#8514bdda enabled:Bool = Bool; contacts.toggleTopPeers#8514bdda enabled:Bool = Bool;
contacts.addContact#e8f463d0 flags:# add_phone_privacy_exception:flags.0?true id:InputUser first_name:string last_name:string phone:string = Updates; contacts.addContact#d9ba2e54 flags:# add_phone_privacy_exception:flags.0?true id:InputUser first_name:string last_name:string phone:string note:flags.1?TextWithEntities = Updates;
contacts.acceptContact#f831a20f id:InputUser = Updates; contacts.acceptContact#f831a20f id:InputUser = Updates;
contacts.getLocated#d348bc44 flags:# background:flags.1?true geo_point:InputGeoPoint self_expires:flags.0?int = Updates; contacts.getLocated#d348bc44 flags:# background:flags.1?true geo_point:InputGeoPoint self_expires:flags.0?int = Updates;
contacts.blockFromReplies#29a8962c flags:# delete_message:flags.0?true delete_history:flags.1?true report_spam:flags.2?true msg_id:int = Updates; contacts.blockFromReplies#29a8962c flags:# delete_message:flags.0?true delete_history:flags.1?true report_spam:flags.2?true msg_id:int = Updates;
@ -2216,6 +2239,7 @@ contacts.editCloseFriends#ba6705f0 id:Vector<long> = Bool;
contacts.setBlocked#94c65c76 flags:# my_stories_from:flags.0?true id:Vector<InputPeer> limit:int = Bool; contacts.setBlocked#94c65c76 flags:# my_stories_from:flags.0?true id:Vector<InputPeer> limit:int = Bool;
contacts.getBirthdays#daeda864 = contacts.ContactBirthdays; contacts.getBirthdays#daeda864 = contacts.ContactBirthdays;
contacts.getSponsoredPeers#b6c8c393 q:string = contacts.SponsoredPeers; contacts.getSponsoredPeers#b6c8c393 q:string = contacts.SponsoredPeers;
contacts.updateContactNote#139f63fb id:InputUser note:TextWithEntities = Bool;
messages.getMessages#63c66506 id:Vector<InputMessage> = messages.Messages; messages.getMessages#63c66506 id:Vector<InputMessage> = 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; 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;
@ -2357,7 +2381,7 @@ messages.getAdminsWithInvites#3920e6ef peer:InputPeer = messages.ChatAdminsWithI
messages.getChatInviteImporters#df04dd4e flags:# requested:flags.0?true subscription_expired:flags.3?true peer:InputPeer link:flags.1?string q:flags.2?string offset_date:int offset_user:InputUser limit:int = messages.ChatInviteImporters; messages.getChatInviteImporters#df04dd4e flags:# requested:flags.0?true subscription_expired:flags.3?true peer:InputPeer link:flags.1?string q:flags.2?string offset_date:int offset_user:InputUser limit:int = messages.ChatInviteImporters;
messages.setHistoryTTL#b80e5fe4 peer:InputPeer period:int = Updates; messages.setHistoryTTL#b80e5fe4 peer:InputPeer period:int = Updates;
messages.checkHistoryImportPeer#5dc60f03 peer:InputPeer = messages.CheckedHistoryImportPeer; messages.checkHistoryImportPeer#5dc60f03 peer:InputPeer = messages.CheckedHistoryImportPeer;
messages.setChatTheme#e63be13f peer:InputPeer emoticon:string = Updates; messages.setChatTheme#81202c9 peer:InputPeer theme:InputChatTheme = Updates;
messages.getMessageReadParticipants#31c1c44f peer:InputPeer msg_id:int = Vector<ReadParticipantDate>; messages.getMessageReadParticipants#31c1c44f peer:InputPeer msg_id:int = Vector<ReadParticipantDate>;
messages.getSearchResultsCalendar#6aa3f6bd flags:# peer:InputPeer saved_peer_id:flags.2?InputPeer filter:MessagesFilter offset_id:int offset_date:int = messages.SearchResultsCalendar; messages.getSearchResultsCalendar#6aa3f6bd flags:# peer:InputPeer saved_peer_id:flags.2?InputPeer filter:MessagesFilter offset_id:int offset_date:int = messages.SearchResultsCalendar;
messages.getSearchResultsPositions#9c7f2f10 flags:# peer:InputPeer saved_peer_id:flags.2?InputPeer filter:MessagesFilter offset_id:int limit:int = messages.SearchResultsPositions; messages.getSearchResultsPositions#9c7f2f10 flags:# peer:InputPeer saved_peer_id:flags.2?InputPeer filter:MessagesFilter offset_id:int limit:int = messages.SearchResultsPositions;
@ -2447,6 +2471,13 @@ messages.readSavedHistory#ba4a3b5b parent_peer:InputPeer peer:InputPeer max_id:i
messages.toggleTodoCompleted#d3e03124 peer:InputPeer msg_id:int completed:Vector<int> incompleted:Vector<int> = Updates; messages.toggleTodoCompleted#d3e03124 peer:InputPeer msg_id:int completed:Vector<int> incompleted:Vector<int> = Updates;
messages.appendTodoList#21a61057 peer:InputPeer msg_id:int list:Vector<TodoItem> = Updates; messages.appendTodoList#21a61057 peer:InputPeer msg_id:int list:Vector<TodoItem> = Updates;
messages.toggleSuggestedPostApproval#8107455c flags:# reject:flags.1?true peer:InputPeer msg_id:int schedule_date:flags.0?int reject_comment:flags.2?string = Updates; messages.toggleSuggestedPostApproval#8107455c flags:# reject:flags.1?true peer:InputPeer msg_id:int schedule_date:flags.0?int reject_comment:flags.2?string = Updates;
messages.getForumTopics#3ba47bff flags:# peer:InputPeer q:flags.0?string offset_date:int offset_id:int offset_topic:int limit:int = messages.ForumTopics;
messages.getForumTopicsByID#af0a4a08 peer:InputPeer topics:Vector<int> = messages.ForumTopics;
messages.editForumTopic#cecc1134 flags:# peer:InputPeer topic_id:int title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = Updates;
messages.updatePinnedForumTopic#175df251 peer:InputPeer topic_id:int pinned:Bool = Updates;
messages.reorderPinnedForumTopics#e7841f0 flags:# force:flags.0?true peer:InputPeer order:Vector<int> = Updates;
messages.createForumTopic#2f98c3d5 flags:# title_missing:flags.4?true peer:InputPeer title:string icon_color:flags.0?int icon_emoji_id:flags.3?long random_id:long send_as:flags.2?InputPeer = Updates;
messages.deleteTopicHistory#d2816f10 peer:InputPeer top_msg_id:int = messages.AffectedHistory;
updates.getState#edd4882a = updates.State; 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.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;
@ -2536,13 +2567,6 @@ channels.reorderUsernames#b45ced1d channel:InputChannel order:Vector<string> = B
channels.toggleUsername#50f24105 channel:InputChannel username:string active:Bool = Bool; channels.toggleUsername#50f24105 channel:InputChannel username:string active:Bool = Bool;
channels.deactivateAllUsernames#a245dd3 channel:InputChannel = Bool; channels.deactivateAllUsernames#a245dd3 channel:InputChannel = Bool;
channels.toggleForum#3ff75734 channel:InputChannel enabled:Bool tabs:Bool = Updates; channels.toggleForum#3ff75734 channel:InputChannel enabled:Bool tabs:Bool = Updates;
channels.createForumTopic#f40c0224 flags:# channel:InputChannel title:string icon_color:flags.0?int icon_emoji_id:flags.3?long random_id:long send_as:flags.2?InputPeer = Updates;
channels.getForumTopics#de560d1 flags:# channel:InputChannel q:flags.0?string offset_date:int offset_id:int offset_topic:int limit:int = messages.ForumTopics;
channels.getForumTopicsByID#b0831eb9 channel:InputChannel topics:Vector<int> = messages.ForumTopics;
channels.editForumTopic#f4dfa185 flags:# channel:InputChannel topic_id:int title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = Updates;
channels.updatePinnedForumTopic#6c2d9026 channel:InputChannel topic_id:int pinned:Bool = Updates;
channels.deleteTopicHistory#34435f2d channel:InputChannel top_msg_id:int = messages.AffectedHistory;
channels.reorderPinnedForumTopics#2950a18f flags:# force:flags.0?true channel:InputChannel order:Vector<int> = Updates;
channels.toggleAntiSpam#68f3e4eb channel:InputChannel enabled:Bool = Updates; channels.toggleAntiSpam#68f3e4eb channel:InputChannel enabled:Bool = Updates;
channels.reportAntiSpamFalsePositive#a850a693 channel:InputChannel msg_id:int = Bool; channels.reportAntiSpamFalsePositive#a850a693 channel:InputChannel msg_id:int = Bool;
channels.toggleParticipantsHidden#6a6e7854 channel:InputChannel enabled:Bool = Updates; channels.toggleParticipantsHidden#6a6e7854 channel:InputChannel enabled:Bool = Updates;
@ -2633,7 +2657,7 @@ payments.getStarGiftUpgradePreview#9c9abcb1 gift_id:long = payments.StarGiftUpgr
payments.upgradeStarGift#aed6e4f5 flags:# keep_original_details:flags.0?true stargift:InputSavedStarGift = Updates; payments.upgradeStarGift#aed6e4f5 flags:# keep_original_details:flags.0?true stargift:InputSavedStarGift = Updates;
payments.transferStarGift#7f18176a stargift:InputSavedStarGift to_id:InputPeer = Updates; payments.transferStarGift#7f18176a stargift:InputSavedStarGift to_id:InputPeer = Updates;
payments.getUniqueStarGift#a1974d72 slug:string = payments.UniqueStarGift; payments.getUniqueStarGift#a1974d72 slug:string = payments.UniqueStarGift;
payments.getSavedStarGifts#a319e569 flags:# exclude_unsaved:flags.0?true exclude_saved:flags.1?true exclude_unlimited:flags.2?true exclude_unique:flags.4?true sort_by_value:flags.5?true exclude_upgradable:flags.7?true exclude_unupgradable:flags.8?true peer:InputPeer collection_id:flags.6?int offset:string limit:int = payments.SavedStarGifts; payments.getSavedStarGifts#a319e569 flags:# exclude_unsaved:flags.0?true exclude_saved:flags.1?true exclude_unlimited:flags.2?true exclude_unique:flags.4?true sort_by_value:flags.5?true exclude_upgradable:flags.7?true exclude_unupgradable:flags.8?true peer_color_available:flags.9?true exclude_hosted:flags.10?true peer:InputPeer collection_id:flags.6?int offset:string limit:int = payments.SavedStarGifts;
payments.getSavedStarGift#b455a106 stargift:Vector<InputSavedStarGift> = payments.SavedStarGifts; payments.getSavedStarGift#b455a106 stargift:Vector<InputSavedStarGift> = payments.SavedStarGifts;
payments.getStarGiftWithdrawalUrl#d06e93a8 stargift:InputSavedStarGift password:InputCheckPasswordSRP = payments.StarGiftWithdrawalUrl; payments.getStarGiftWithdrawalUrl#d06e93a8 stargift:InputSavedStarGift password:InputCheckPasswordSRP = payments.StarGiftWithdrawalUrl;
payments.toggleChatStarGiftNotifications#60eaefa1 flags:# enabled:flags.0?true peer:InputPeer = Bool; payments.toggleChatStarGiftNotifications#60eaefa1 flags:# enabled:flags.0?true peer:InputPeer = Bool;
@ -2675,7 +2699,7 @@ phone.joinGroupCall#8fb53057 flags:# muted:flags.0?true video_stopped:flags.2?tr
phone.leaveGroupCall#500377f9 call:InputGroupCall source:int = Updates; phone.leaveGroupCall#500377f9 call:InputGroupCall source:int = Updates;
phone.inviteToGroupCall#7b393160 call:InputGroupCall users:Vector<InputUser> = Updates; phone.inviteToGroupCall#7b393160 call:InputGroupCall users:Vector<InputUser> = Updates;
phone.discardGroupCall#7a777135 call:InputGroupCall = Updates; phone.discardGroupCall#7a777135 call:InputGroupCall = Updates;
phone.toggleGroupCallSettings#74bbb43d flags:# reset_invite_hash:flags.1?true call:InputGroupCall join_muted:flags.0?Bool = Updates; phone.toggleGroupCallSettings#e9723804 flags:# reset_invite_hash:flags.1?true call:InputGroupCall join_muted:flags.0?Bool messages_enabled:flags.2?Bool = Updates;
phone.getGroupCall#41845db call:InputGroupCall limit:int = phone.GroupCall; phone.getGroupCall#41845db call:InputGroupCall limit:int = phone.GroupCall;
phone.getGroupParticipants#c558d8ab call:InputGroupCall ids:Vector<InputPeer> sources:Vector<int> offset:string limit:int = phone.GroupParticipants; phone.getGroupParticipants#c558d8ab call:InputGroupCall ids:Vector<InputPeer> sources:Vector<int> offset:string limit:int = phone.GroupParticipants;
phone.checkGroupCall#b59cf977 call:InputGroupCall sources:Vector<int> = Vector<int>; phone.checkGroupCall#b59cf977 call:InputGroupCall sources:Vector<int> = Vector<int>;
@ -2698,6 +2722,8 @@ phone.sendConferenceCallBroadcast#c6701900 call:InputGroupCall block:bytes = Upd
phone.inviteConferenceCallParticipant#bcf22685 flags:# video:flags.0?true call:InputGroupCall user_id:InputUser = Updates; phone.inviteConferenceCallParticipant#bcf22685 flags:# video:flags.0?true call:InputGroupCall user_id:InputUser = Updates;
phone.declineConferenceCallInvite#3c479971 msg_id:int = Updates; phone.declineConferenceCallInvite#3c479971 msg_id:int = Updates;
phone.getGroupCallChainBlocks#ee9f88a6 call:InputGroupCall sub_chain_id:int offset:int limit:int = Updates; phone.getGroupCallChainBlocks#ee9f88a6 call:InputGroupCall sub_chain_id:int offset:int limit:int = Updates;
phone.sendGroupCallMessage#87893014 call:InputGroupCall random_id:long message:TextWithEntities = Bool;
phone.sendGroupCallEncryptedMessage#e5afa56d call:InputGroupCall encrypted_message:bytes = Bool;
langpack.getLangPack#f2f2330a lang_pack:string lang_code:string = LangPackDifference; langpack.getLangPack#f2f2330a lang_pack:string lang_code:string = LangPackDifference;
langpack.getStrings#efea3803 lang_pack:string lang_code:string keys:Vector<string> = Vector<LangPackString>; langpack.getStrings#efea3803 lang_pack:string lang_code:string keys:Vector<string> = Vector<LangPackString>;

View File

@ -138,6 +138,7 @@
transition: transform var(--slide-transition); transition: transform var(--slide-transition);
&::before { &::before {
pointer-events: none;
content: ""; content: "";
position: absolute; position: absolute;

View File

@ -79,28 +79,34 @@ function setPeerColor(n: string, colors: string[], darkColors?: string[]) {
const mainDarkColor = darkColors?.[0]; const mainDarkColor = darkColors?.[0];
if (!mainLightColor) return; if (!mainLightColor) return;
const lightBgColor = `${mainLightColor}${PEER_COLOR_BG_OPACITY}`; const { bg: lightBgColor, bgActive: lightBgActiveColor } = generateColorVariations(mainLightColor);
const darkBgColor = mainDarkColor ? `${mainDarkColor}${PEER_COLOR_BG_OPACITY}` : undefined; const { bg: darkBgColor, bgActive: darkBgActiveColor } = mainDarkColor
? generateColorVariations(mainDarkColor) : { bg: undefined, bgActive: undefined };
const lightBgActiveColor = `${mainLightColor}${PEER_COLOR_BG_ACTIVE_OPACITY}`;
const darkBgActiveColor = mainDarkColor ? `${mainDarkColor}${PEER_COLOR_BG_ACTIVE_OPACITY}` : undefined;
setVariable(`color-peer-${n}`, mainLightColor, mainDarkColor); setVariable(`color-peer-${n}`, mainLightColor, mainDarkColor);
setVariable(`color-peer-bg-${n}`, lightBgColor, darkBgColor); setVariable(`color-peer-bg-${n}`, lightBgColor, darkBgColor);
setVariable(`color-peer-bg-active-${n}`, lightBgActiveColor, darkBgActiveColor); setVariable(`color-peer-bg-active-${n}`, lightBgActiveColor, darkBgActiveColor);
if (colors.length > 1) { if (colors.length > 1) {
const lightGradientColors = colors.map((color, i) => ( const lightGradient = generatePeerColorGradient(colors);
`${color} ${i * PEER_COLOR_GRADIENT_STEP}px, ${color} ${(i + 1) * PEER_COLOR_GRADIENT_STEP}px` const darkGradient = darkColors ? generatePeerColorGradient(darkColors) : undefined;
));
const darkGradientColors = darkColors?.map((color, i) => (
`${color} ${i * PEER_COLOR_GRADIENT_STEP}px, ${color} ${(i + 1) * PEER_COLOR_GRADIENT_STEP}px`
));
const lightGradient = `repeating-linear-gradient(-45deg, ${lightGradientColors.join(', ')})`;
const darkGradient = darkGradientColors
? `repeating-linear-gradient(-45deg, ${darkGradientColors.join(', ')})`
: undefined;
setVariable(`color-peer-gradient-${n}`, lightGradient, darkGradient); setVariable(`color-peer-gradient-${n}`, lightGradient, darkGradient);
} }
} }
export function generateColorVariations(baseColor: string) {
return {
bg: `${baseColor}${PEER_COLOR_BG_OPACITY}`,
bgActive: `${baseColor}${PEER_COLOR_BG_ACTIVE_OPACITY}`,
};
}
export function generatePeerColorGradient(colors: string[]) {
if (colors.length === 1) return colors[0];
const gradientColors = colors.map((color, i) => (
`${color} ${i * PEER_COLOR_GRADIENT_STEP}px, ${color} ${(i + 1) * PEER_COLOR_GRADIENT_STEP}px`
));
return `repeating-linear-gradient(-45deg, ${gradientColors.join(', ')})`;
}