Compare commits

...

636 Commits

Author SHA1 Message Date
Andrea Cavalli
d0014b1f5a Always use 128 client threads (todo: make this behavior optional)
This change fixes some memory management issues
2024-02-19 11:50:59 +01:00
Andrea Cavalli
640a6687bf Disable ccache script 2024-02-19 11:26:16 +01:00
Andrea Cavalli
06304b252c Apply tdlight patch 2024-02-19 11:26:16 +01:00
Vyacheslav
d0ff90bb19 Replace noinspection instruction with proper @SuppressWarnings annotation
`//noinspection unchecked` suppresses unchecked cast warning only in the IDE. `@SuppressWarning` annotation properly suppresses both IDE and the compiler warnings.
2024-02-16 11:26:46 +03:00
levlam
d93a99e335 Update version to 1.8.25. 2024-02-16 01:00:29 +03:00
levlam
5b9c066b34 Add binlog_ null checks. 2024-02-15 19:54:14 +03:00
levlam
e12b13bbb0 Keep reference to Td in TdDb::open to ensure that it isn't closed completely in the meanwhile. 2024-02-15 19:45:27 +03:00
levlam
6707463e85 Don't check ChannelFull for bots. 2024-02-15 18:47:20 +03:00
levlam
da5ba34850 Minor fixes. 2024-02-15 17:19:19 +03:00
levlam
78f3363486 Add key validness checks before adding to FlatHashSet. 2024-02-15 17:16:08 +03:00
levlam
0369a1a185 Check options in alphabetical order. 2024-02-15 16:32:03 +03:00
levlam
82e3cef939 Ignore duplicate animations in premium state. 2024-02-15 12:05:00 +03:00
levlam
862497601e Fix chatEventStickerSetChanged. 2024-02-14 18:02:48 +03:00
levlam
4160b1a31a Improve documentation. 2024-02-14 14:31:14 +03:00
levlam
52c27fef85 Remove redundant logging. 2024-02-14 13:56:18 +03:00
levlam
f54e5bb4bf Improve chatAdministratorRights documentation. 2024-02-14 13:05:41 +03:00
levlam
e1098ef8e9 Allow empty non-null backgrounds in chat event log. 2024-02-13 16:56:07 +03:00
levlam
4198bff4af Don't initialize story sender for anonymous administrators. 2024-02-13 14:17:47 +03:00
levlam
6dfdb00f85 Support messageActionBoostApply. 2024-02-13 13:45:40 +03:00
levlam
781c9f53cb Fix sender_id for yet unsent stories. 2024-02-13 13:41:51 +03:00
levlam
e978e86c50 Add more story_id checks. 2024-02-13 13:41:05 +03:00
levlam
0dc90cf820 Remove chat identifier from setStoryPrivacySettings. 2024-02-13 13:13:41 +03:00
levlam
e9c8fb8cb4 Ignore story privacy settings for channel stories. 2024-02-13 13:07:09 +03:00
levlam
1c40ce963c Reload chats to send stories after updating the list locally to restore correct order. 2024-02-13 12:55:07 +03:00
levlam
fce9ba0da1 Fix giveaway documentation. 2024-02-13 00:26:52 +03:00
levlam
638e5e5d8c Update default list of Premium features. 2024-02-13 00:10:54 +03:00
levlam
6b0262e9f7 Increase appConfig version. 2024-02-12 23:37:18 +03:00
levlam
0bdc409212 Add td_api::premiumFeatureLastSeenTimes. 2024-02-12 23:32:01 +03:00
levlam
b9de5cd0f9 Add td_api::premiumFeatureMessagePrivacy. 2024-02-12 23:27:44 +03:00
levlam
02d1cef461 Fix handling of 0 min boost level. 2024-02-12 22:59:12 +03:00
levlam
767336fb21 Improve documentation for supergroup stories. 2024-02-12 22:41:22 +03:00
levlam
e94017b850 Improve setChatAvailableReactions documentation. 2024-02-12 19:38:26 +03:00
levlam
6be9e02e62 Improve inputMessageReplyToStory documentation. 2024-02-12 19:31:33 +03:00
levlam
bcccfa071f Improve documentation. 2024-02-12 19:23:28 +03:00
levlam
9e1aba6621 Remove member management function documentation. 2024-02-12 19:14:52 +03:00
levlam
9a9ffa6794 Add and use can_change_info_and_settings_as_administrator. 2024-02-12 18:48:14 +03:00
levlam
9e32ab8ad1 Improve can_change_info right documentation. 2024-02-12 18:00:38 +03:00
levlam
46f076f47c Add td_api::setSupergroupUnrestrictBoostCount. 2024-02-12 17:42:35 +03:00
levlam
9d0ca2670e Add story.sender_id. 2024-02-12 16:12:29 +03:00
levlam
978cd5ef34 Support replying of supergroup stories in the supergroup. 2024-02-11 02:57:08 +03:00
levlam
e62f612c36 Add Message.sender_boost_count. 2024-02-11 02:45:18 +03:00
levlam
539fd729ea Allow stories administrator rights in supergroups. 2024-02-11 02:16:25 +03:00
levlam
81f959be99 Support supergroups in getChatBoostFeatures, 2024-02-11 01:29:07 +03:00
levlam
1728dbf561 Add rights check in get_background_dialog. 2024-02-10 23:53:44 +03:00
levlam
3745632f68 Support setChatEmojiStatus in supergroups. 2024-02-10 23:39:02 +03:00
levlam
75a812ba10 Support change of profile accent color in supergroups. 2024-02-09 16:54:16 +03:00
levlam
e12a1550d9 More precise check in can_use_premium_custom_emoji. 2024-02-09 16:20:13 +03:00
levlam
2220d6bd32 Poll active stories in supergroups. 2024-02-09 15:40:17 +03:00
levlam
423688771d Support gift codes in supergroups. 2024-02-09 14:54:57 +03:00
levlam
49003c5cce Generate boost links for supergroups and in new format, 2024-02-09 14:39:35 +03:00
levlam
7b6c5b3517 Support giveaways in supergroups. 2024-02-09 14:13:46 +03:00
levlam
83a92d5258 Support supergroup boost options. 2024-02-09 14:03:53 +03:00
levlam
665d04296b Don't send slow_mode_delay_expires_in if user is a booster. 2024-02-09 12:23:49 +03:00
levlam
0238a3da42 Ignore restrictions by supergroup boosters. 2024-02-08 23:30:41 +03:00
levlam
353c809298 Add supergroupFullInfo.unrestrict_boost_count. 2024-02-08 19:04:28 +03:00
levlam
2037b049c5 Add supergroupFullInfo.my_boost_count. 2024-02-08 18:51:40 +03:00
levlam
0dad023262 Allow to use Premium custom emoji from group emoji set in supergroups. 2024-02-08 15:09:26 +03:00
levlam
42784587ad Support custom emoji sticker set in supergroups. 2024-02-08 15:02:04 +03:00
levlam
29d4de052e Add profileAccentColor.min_supergroup_boost_level. 2024-02-08 14:35:42 +03:00
levlam
9400447fde Add td_api::chatEventCustomEmojiStickerSetChanged. 2024-02-08 13:46:45 +03:00
levlam
64635aefe1 Add td_api::messageChatBoost. 2024-02-07 20:50:00 +03:00
levlam
cb3c623fd2 Update layer to 174. 2024-02-07 20:34:28 +03:00
levlam
c0d78b9f04 Add MessagesManager::set_folder_pinned_dialogs. 2024-02-09 23:23:18 +03:00
levlam
3e66162c07 Add source to set_dialog_view_as_messages. 2024-02-08 01:33:08 +03:00
levlam
238c282368 Update server_total_count when topic list changes. 2024-02-07 20:03:46 +03:00
levlam
071d232908 Add td_api::updateSavedMessagesTopicCount. 2024-02-07 19:45:06 +03:00
levlam
d243739d67 Remove unused variable. 2024-02-07 18:01:35 +03:00
levlam
afb8524392 Minor fixes. 2024-02-07 17:50:57 +03:00
levlam
2ca4672a98 Improve logging and fix on_topic_changed. 2024-02-07 16:51:08 +03:00
levlam
e7d6a982fa Add source to send_update_saved_messages_topic. 2024-02-07 16:24:05 +03:00
levlam
6cfb50fd8f Support Saved Messages topic draft. 2024-02-07 16:10:56 +03:00
levlam
21696de370 Support Saved Messages in toggleChatViewAsTopics. 2024-02-07 15:32:50 +03:00
levlam
121461561e Add and use SavedMessagesManager::get_topic_ids. 2024-02-07 14:59:24 +03:00
levlam
7478bf3051 Don't reload pinned Saved Messages topics if they weren't loaded. 2024-02-07 14:52:02 +03:00
levlam
3fa7448dd9 Add logging in send_update_saved_messages_topic. 2024-02-07 14:33:01 +03:00
levlam
f28d40605a Improve Saved Messages topic API and naming. 2024-02-07 14:01:29 +03:00
levlam
aae57bf18a Move pinned topics to TopicList. 2024-02-07 12:49:00 +03:00
levlam
bb5d9d8777 Combine GetSavedDialogsQuery requests. 2024-02-07 12:45:13 +03:00
levlam
39ea60e889 Combine GetPinnedSavedDialogsQuery requests. 2024-02-07 12:42:10 +03:00
levlam
6cd6242931 Add td_api::loadSavedMessagesTopics instead of server-side topic load methods. 2024-02-07 12:30:34 +03:00
levlam
73f3696eda Send updateSavedMessagesTopic when last topic message changes. 2024-02-06 16:08:41 +03:00
levlam
7f0f3e9ff0 Add and use MessagesManager::send_update_last_message_if_needed. 2024-02-06 16:03:11 +03:00
levlam
5d0b8c71a5 Remove updatePinnedSavedMessagesTopics and handle updates on the TDLib side. 2024-02-06 15:12:03 +03:00
levlam
4882919461 Fix drop of topic order. 2024-02-06 14:58:37 +03:00
levlam
524899a6ae Update last topic date when loading Saved Messages topics. 2024-02-06 14:26:48 +03:00
levlam
f3d81a1aea Remove superflous saved_messages_topic_id parameters. 2024-02-06 01:24:25 +03:00
levlam
0baa1424f9 Add updateSavedMessagesTopic and more fields about the topic. 2024-02-06 01:21:55 +03:00
levlam
b45cd6e298 Add SavedMessagesManager::get_found_saved_messages_topic_object. 2024-02-06 00:58:13 +03:00
levlam
82702c4331 Store last message date along last topic message identifier. 2024-02-06 00:11:36 +03:00
levlam
0bcc699dc5 Add checks for maximum count of pinned Saved Messages topic and their existence before locally pin them. 2024-02-05 22:31:16 +03:00
levlam
abd4cec117 Maintain order of pinned Saved Messages topics and apply all changes locally first. 2024-02-05 22:22:17 +03:00
levlam
00984e1ebd Add logging in set_topic_last_message_id. 2024-02-05 10:30:04 +03:00
levlam
741b0fc6af Repair last Saved Messages topic message by fetching history. 2024-02-05 10:20:35 +03:00
levlam
db500ffae5 Process Saved Messages topic history inside SavedMessagesManager. 2024-02-05 10:06:58 +03:00
levlam
3d8c749536 Maintain last message of Saved Messages topics. 2024-02-05 00:56:20 +03:00
levlam
7267e1e89c Move Saved Messages-specific functions to SavedMessagesManager. 2024-02-04 23:06:48 +03:00
levlam
1eb8c22f75 Add empty SavedMessagesManager. 2024-02-04 12:41:53 +03:00
levlam
d85dcb8298 Send update when title of unused tag changes. 2024-02-02 18:52:53 +03:00
levlam
f0503191e4 Load Saved Messages tags in topic from database. 2024-02-02 17:09:49 +03:00
levlam
3e9f2ba515 Merge add_saved_reaction_tags and get_saved_reaction_tags. 2024-02-02 16:49:13 +03:00
levlam
af0c522c45 Use currently used tags to sort available tags in Saved Messages. 2024-02-02 16:38:37 +03:00
levlam
04f3432574 Load all Saved Messages tags from database. 2024-02-02 16:30:11 +03:00
levlam
56e37a87a2 Save Saved Messages tags to database. 2024-02-02 00:06:59 +03:00
levlam
32eba3c7d1 Enable setting tags by Premium users. 2024-02-01 22:40:55 +03:00
levlam
db4bd6b133 Strip more empty characters. 2024-02-01 21:16:01 +03:00
levlam
d6ba869457 Update getSavedMessagesTags documentation. 2024-02-01 20:41:14 +03:00
levlam
b9e339c934 Improve ServiceActor logging. 2024-02-01 20:31:43 +03:00
levlam
c287f02e9a Fix logging of migrating actors. 2024-02-01 16:00:38 +03:00
levlam
d120d0ab66 Set close_flag before clearing requests. 2024-02-01 14:59:55 +03:00
levlam
f11c4e8af4 Add searchSavedMessages.saved_messages_topic. 2024-02-01 13:09:01 +03:00
levlam
0e16c0af02 Hide video and voice message drafts when the message is sent. 2024-01-31 02:58:17 +03:00
levlam
2f1de10541 Add and use MessagesManager::clear_dialog_draft_by_sent_message. 2024-01-31 02:47:43 +03:00
levlam
f7bf5f268a Mark top_thread_message_id as const when possible. 2024-01-31 01:52:02 +03:00
levlam
2a81a11e61 Keep and pass to the server initial top_thread_message_id specified by the app. 2024-01-31 01:45:20 +03:00
levlam
3dbf71e886 Allow longer nop and quick acks. 2024-01-30 19:23:04 +03:00
levlam
9d93e9f090 Support local voice note message drafts. 2024-01-30 17:23:08 +03:00
levlam
0ed3ed75fa Add local video note drafts. 2024-01-30 16:59:14 +03:00
levlam
c7952b1c1d Add td_api::premiumStoryFeatureVideoQuality. 2024-01-30 03:29:50 +03:00
levlam
1ce1761190 Add td_api::premiumFeatureSavedMessagesTags. 2024-01-30 03:11:23 +03:00
levlam
930a3ccdca Support Saved Messages tags in topics. 2024-01-29 19:11:14 +03:00
levlam
027b23ac5a Simplify SavedReactionTags::update_saved_messages_tags. 2024-01-29 18:58:30 +03:00
levlam
2a8156a1bc Add registerUser.disable_notification. 2024-01-29 16:43:42 +03:00
levlam
440d9de15a Update layer to 173. 2024-01-29 16:32:02 +03:00
levlam
0e311c404b Add more logging. 2024-02-06 13:13:50 +03:00
levlam
3a5630356a Fix destroy_auth_keys. 2024-02-06 12:59:01 +03:00
levlam
acecb48548 Log fields of the type True. 2024-02-06 12:42:10 +03:00
levlam
d11e88c9eb Simplify True fetching. 2024-02-05 14:10:19 +03:00
levlam
d2680fff48 Move include of utf8.h to tl_parsers.cpp. 2024-02-04 22:12:18 +03:00
levlam
81907c1c7a Remove force_sync after starting auth key destroy. 2024-02-03 23:14:02 +03:00
levlam
9080b84649 Don't force sync after log in for bots. 2024-02-02 15:24:23 +03:00
levlam
12914669e6 Don't sync binlog after creation of SQLite encryption key if it will not be used. 2024-02-02 15:23:26 +03:00
levlam
8377726001 Add source to Binlog::sync. 2024-02-02 15:09:17 +03:00
levlam
d79bd4b694 Don't check disable_web_page_preview for sponsored messages. 2024-02-02 13:38:40 +03:00
levlam
7c3e9e6d5e Move DcAuthManager to main session scheduler. 2024-02-02 13:32:15 +03:00
levlam
6c4804b591 Add source to SessionProxy::close_session. 2024-02-01 12:59:20 +03:00
levlam
acec5146ec Close asynchronously opened database if instance was closed in the meanwhile. 2024-02-01 01:46:34 +03:00
levlam
034db9599d Improve checks for changed link preview. 2024-01-31 18:10:53 +03:00
levlam
ec21b0276f Set disable_web_page_preview to true only if the message has a link. 2024-01-31 12:48:03 +03:00
levlam
3d539f1bcc Add class MessageSelfDestructType. 2024-01-30 15:07:21 +03:00
levlam
437c2d0c6e Try to repair wrongly encoded proxy secret. 2024-01-29 15:48:57 +03:00
levlam
983f669116 Fail sending of messages for which updateMessageId has been received. 2024-01-29 01:48:58 +03:00
levlam
eb3f9f7ba1 Improve error messages. 2024-01-29 01:09:46 +03:00
levlam
5acc895975 Improve error message. 2024-01-29 00:55:37 +03:00
levlam
c92948e8b9 Improve error message. 2024-01-29 00:39:07 +03:00
levlam
34935ca4b6 Reopen and reinit session when receive a failed to parse update by a bot. 2024-01-29 00:18:40 +03:00
levlam
a60d6f5dfb Fix RepliedMessageInfo::need_reply_changed_warning. 2024-01-28 02:06:04 +03:00
levlam
4a29cd7f00 Don't warn about sent message identifier decrease, if the new message has identifier 1. 2024-01-28 01:59:33 +03:00
levlam
8c02d57443 Don't try to get name of an empty actor. 2024-01-27 13:27:55 +03:00
levlam
c5c55092dd Update version to 1.8.24. 2024-01-27 03:43:28 +03:00
levlam
17e5d20583 Fix message_input_reply_to access for server messages. 2024-01-27 03:42:36 +03:00
levlam
7144475524 Increase MessageUnsupported version. 2024-01-26 23:07:39 +03:00
levlam
cdd7430d3a Silently create chat in get_message_sender_object. 2024-01-26 23:03:37 +03:00
levlam
d3a5025dae Remove unused header. 2024-01-26 17:07:42 +03:00
levlam
dace1cdb23 Fix GetMessagePositionQuery. 2024-01-26 15:37:32 +03:00
levlam
ba75dd2626 Improve update handling logging. 2024-01-26 15:08:16 +03:00
levlam
73dc2b9889 Use multiset to store pending updates and improve PendingPtsUpdate comparison. 2024-01-26 14:59:07 +03:00
levlam
aa6be7d9bf Add canSendMessageToUser.only_local. 2024-01-26 14:06:27 +03:00
levlam
3391c643f3 Don't try to fetch the same update more than once. 2024-01-26 14:01:44 +03:00
levlam
b6fe959ece Improve update processing logging. 2024-01-26 11:25:09 +03:00
levlam
238d154ed7 Immediately fetch affected messages. 2024-01-26 00:30:49 +03:00
levlam
168bba072d Remove UpdatesManager::init_sessions, because sessions are inited now by choosing of random one to send request, and init_sessions isn't called after temporary key is changed. 2024-01-25 22:33:44 +03:00
levlam
233633b705 Don't postpone updates with pts_count > 1, because they can partly overlap with getDifference results. 2024-01-25 22:28:07 +03:00
levlam
c9a357f80d Support gaps with 0 pts_count in UpdatesManager::on_get_pts_update. 2024-01-25 22:02:11 +03:00
levlam
2acbcdbb60 Allow sending messages to user after receiving a message from them. 2024-01-25 20:56:10 +03:00
levlam
8c2375fdfe Invalidate user_full_contact_require_premium_ when contact_require_premium changes. 2024-01-25 20:51:52 +03:00
levlam
c95cb5d75c Minor imrovements. 2024-01-25 20:06:07 +03:00
levlam
c2ccf0d784 Add some emptiness checks. 2024-01-25 19:37:56 +03:00
levlam
f2262cdcfb Add checks for null user. 2024-01-25 19:11:54 +03:00
levlam
4464a8479b Use FlatHashSet to check internal options. 2024-01-25 18:50:37 +03:00
levlam
dfdad00dca Don't warn about topic changed to or from Author Hidden. 2024-01-25 18:08:53 +03:00
levlam
07e381eaab Add SavedMessagesTopicId::is_author_hidden. 2024-01-25 18:04:32 +03:00
levlam
b97773457b Don't set explicitly source.is_outgoing for messages forwarded from the user. 2024-01-25 18:01:51 +03:00
levlam
db1644bb13 Add and use SavedReactionTag constructor. 2024-01-25 17:29:29 +03:00
levlam
04ec06ef4f Update tag labels locally. 2024-01-25 17:12:02 +03:00
levlam
2b442c1caa Add ReactionManager::reget_saved_messages_tags. 2024-01-25 17:04:02 +03:00
levlam
650ca8844d Init SavedMessagesTopic with real_forward_from_dialog_id. 2024-01-25 16:45:24 +03:00
levlam
2f1423a284 Allow forwardSource without source message. 2024-01-25 16:23:00 +03:00
levlam
81f1d61e7f Improve Saved Messages tag documentation. 2024-01-25 14:58:32 +03:00
levlam
096fc39bd1 Cache reaction tag hash. 2024-01-25 14:29:22 +03:00
levlam
09122ba596 Update SavedReactionTag comparison operator. 2024-01-25 14:13:06 +03:00
levlam
0cbda12b4c Remove handling of some sendMessage error messages. 2024-01-24 22:05:22 +03:00
levlam
faf975ccc9 Use UserId::get_user_ids instead of explicit transform. 2024-01-24 21:40:14 +03:00
levlam
7628646b63 Fix Java build. 2024-01-24 21:35:50 +03:00
levlam
b8799a7e8c Fix source.is_outgoing flag. 2024-01-24 20:44:07 +03:00
levlam
a14091ff81 Improve LastForwardedMessageInfo logging. 2024-01-24 20:03:42 +03:00
levlam
56d75e7c53 Don't keep full message source for initially forwarded messages. 2024-01-24 20:01:29 +03:00
levlam
d7e35f4c44 Improve privacy settings. 2024-01-24 18:59:53 +03:00
levlam
94141a18dd Make canSendMessageToUser response strongly typed. 2024-01-19 22:14:03 +03:00
levlam
0a6207700d Use GetIsPremiumRequiredToContactQuery to check unknown users. 2024-01-19 21:55:24 +03:00
levlam
5624f91155 Add td_api::canSendMessageToUser. 2024-01-19 15:35:57 +03:00
levlam
59de70bd87 Keep flag UserFull.contact_require_premium. 2024-01-19 15:01:07 +03:00
levlam
ecbbef18e2 Document that setNewChatPrivacySettings can be used only by Premium users. 2024-01-19 14:37:16 +03:00
levlam
a3ac41e283 Add user.restricts_new_chats. 2024-01-19 14:35:37 +03:00
levlam
c8e4622da4 Add td_api::newChatPrivacySettings and methods for getting and setting it. 2024-01-19 14:25:24 +03:00
levlam
2504de4978 Add td_api::setReadDatePrivacySettings. 2024-01-09 17:56:47 +03:00
levlam
252ca3135c Add td_api::getReadDatePrivacySettings. 2024-01-09 17:11:22 +03:00
levlam
e85694e6ff Support other global privacy settings. 2024-01-09 16:00:59 +03:00
levlam
d950add490 Reget global privacy settings before setting them. 2024-01-09 15:54:25 +03:00
levlam
9802119ff7 Return GlobalPrivacySettings from get_global_privacy_settings. 2024-01-09 15:14:45 +03:00
levlam
b2f8a8e5d6 Support UserFull.read_dates_private. 2024-01-09 14:56:32 +03:00
levlam
d6eca27e58 Improve td_api::MessageReadDate. 2024-01-09 14:47:04 +03:00
levlam
5fc554166f Add Message.can_get_read_date. 2024-01-09 13:50:11 +03:00
levlam
5baf9f52f8 Add internal "pm_read_date_expire_period" option. 2024-01-09 13:41:59 +03:00
levlam
5fb64e7ccd Add td_api::getMessageReadDate. 2024-01-09 13:37:29 +03:00
levlam
0e032795b6 Add by_my_privacy_settings flag to td_api::UserStatus. 2024-01-09 12:34:02 +03:00
levlam
b171fbe373 Update layer to 172. 2024-01-09 12:09:10 +03:00
levlam
9fe83feeeb Add td_api::ReactionUnavailabilityReason. 2024-01-24 17:11:41 +03:00
levlam
33ec7a21a8 Update Saved Messages tag count when tags are added from another app or message is deleted. 2024-01-24 12:31:12 +03:00
levlam
2351a83227 Add and use get_chosen_tags. 2024-01-24 12:01:20 +03:00
levlam
1b15b2825c Add and use SavedReactionTags::calc_hash(). 2024-01-24 00:25:02 +03:00
levlam
839969e255 Allow tags with label but without count. 2024-01-23 23:11:12 +03:00
levlam
588b889e4c Check Saved Messages tags for validness. 2024-01-23 23:04:47 +03:00
levlam
cb70c0fa97 Update saved reaction tags after changing them locally. 2024-01-23 22:56:00 +03:00
levlam
ae18e3de6b Add availableReaction.is_tag. 2024-01-23 21:28:39 +03:00
levlam
956c35d6e0 Add td_api::setSavedMessagesTagLabel. 2024-01-23 19:04:31 +03:00
levlam
e7953c067c Send GetSavedReactionTagsQuery ordered with SendReactionQuery. 2024-01-23 17:04:03 +03:00
levlam
1c53d32aba Return default tag reactions first for tags. 2024-01-23 16:49:50 +03:00
levlam
9a09125d62 Support telegram_api::updateSavedReactionTags. 2024-01-23 16:39:15 +03:00
levlam
291cd4203a Add td_api::updateSavedMessagesTags. 2024-01-23 16:23:35 +03:00
levlam
9df2ba6e64 Add td_api::getSavedMessagesTags. 2024-01-23 16:01:27 +03:00
levlam
e6611cdb8f Add td_api::searchSavedMessages. 2024-01-22 21:14:02 +03:00
levlam
e8f96d2520 Support adding tags to a message. 2024-01-22 20:25:19 +03:00
levlam
61277da56f Move message_id checks to get_message_active_reactions. 2024-01-22 20:15:02 +03:00
levlam
b9afcbb70c Support reaction tags in getMessageAvailableReactions. 2024-01-22 20:03:05 +03:00
levlam
ed4f18bfaf Don't allow to call get_id() on non-abstract classes. 2024-01-22 19:46:12 +03:00
levlam
eb80098431 Add td_api::messageReactions and messageReactions.are_tags. 2024-01-22 19:37:05 +03:00
levlam
0823ee492e Add enum ReactionListType. 2024-01-18 20:53:43 +03:00
levlam
f4388dfc5c Add ReactionList.is_loaded_from_database. 2024-01-18 20:12:22 +03:00
levlam
74aab0a7b2 Load default tag reactions. 2024-01-18 20:08:37 +03:00
levlam
20c4815a12 Add td_api::setPinnedSavedMessagesTopics. 2024-01-18 19:38:26 +03:00
levlam
af43242ca7 Add td_api::toggleSavedMessagesTopicIsPinned. 2024-01-18 19:22:31 +03:00
levlam
ae7e290789 Add td_api::updatePinnedSavedMessagesTopics. 2024-01-18 18:51:34 +03:00
levlam
643b896958 Add td_api::premiumLimitTypePinnedSavedMessagesTopicsCount. 2024-01-18 18:34:39 +03:00
levlam
30dad21fae Add MessagesManager::fix_delete_message_min_max_dates. 2024-01-18 17:47:59 +03:00
levlam
8c358a4fc5 Add SavedMessagesTopicId::is_valid_status. 2024-01-18 17:38:15 +03:00
levlam
788d169e69 Add td_api::deleteSavedMessagesTopicMessagesByDate. 2024-01-18 17:29:09 +03:00
levlam
5002f25c0a Add td_api::getSavedMessagesTopicMessageByDate. 2024-01-18 16:45:45 +03:00
levlam
26d63f605b Rename chat permission to can_create_topics. 2024-01-17 12:22:56 +03:00
levlam
93370af38d Add td_api::deleteSavedMessagesTopicHistory. 2024-01-16 22:42:43 +03:00
levlam
40f8bffec8 Add td_api::getSavedMessagesTopicHistory. 2024-01-16 19:19:38 +03:00
levlam
d9f2fe57a6 Add td_api::getPinnedSavedMessagesTopics. 2024-01-16 17:32:11 +03:00
levlam
79a66c06cc Add td_api::getSavedMessagesTopics. 2024-01-16 16:26:58 +03:00
levlam
16fc47fb88 Add getChatSparseMessagePositions.saved_messages_topic. 2024-01-16 14:12:57 +03:00
levlam
f76c384f90 Add getChatMessageCalendar.saved_messages_topic. 2024-01-16 14:00:14 +03:00
levlam
8f019eeb73 Add getChatMessageCount.saved_messages_topic. 2024-01-16 00:30:37 +03:00
levlam
7e3107b1d3 Add SavedMessagesTopicId::is_valid_in. 2024-01-15 23:25:51 +03:00
levlam
3eba7d4f2b Add getChatMessagePosition.saved_messages_topic. 2024-01-15 20:39:47 +03:00
levlam
7d71562a24 Add searchChatMessages.saved_messages_topic_id. 2024-01-15 19:43:03 +03:00
levlam
341b59cb6c Duplicate fields from origin to source if appropriate. 2024-01-15 18:56:59 +03:00
levlam
85c4cd4642 Add SavedMessagesTopicId class. 2024-01-13 12:06:31 +03:00
levlam
0aeb11dee8 Add message.saved_messages_topic. 2024-01-12 16:06:10 +03:00
levlam
09e0add01f Add Message.saved_messages_dialog_id. 2024-01-12 15:38:12 +03:00
levlam
2ff04387b8 Add more information to forwardSource. 2024-01-12 00:23:33 +03:00
levlam
91aef01e7e Add td_api::forwardSource. 2024-01-11 22:48:22 +03:00
levlam
8a8b87c9ea Uodate SplitSource.php dependencies. 2024-01-11 22:35:46 +03:00
levlam
1dca0272be Add class LastForwardedMessageInfo. 2024-01-11 22:33:12 +03:00
levlam
b287f2f177 Remove unused init_stickers_manager fucntion. 2024-01-11 21:46:12 +03:00
levlam
10f77aee95 Move get_dialog_reply_markup implementation to ReplyMarkup.cpp. 2024-01-11 20:35:02 +03:00
levlam
645102e4ed Make MessageForwardInfo fields private. 2024-01-11 20:13:43 +03:00
levlam
6b180bcfd9 Add MessageForwardInfo::copy_message_forward_info. 2024-01-11 20:10:14 +03:00
levlam
c30c6168b5 Add and use MessageForwardInfo::need_change_warning. 2024-01-11 19:59:14 +03:00
levlam
edb02aa4c4 Add MessageForwardInfo::is_imported(). 2024-01-11 19:39:32 +03:00
levlam
8c6024808a Add and use MessagesManager::get_message_original_date. 2024-01-11 19:36:00 +03:00
levlam
b3a94f187f Use public constructor to create legacy-parsed MessageForwardInfo. 2024-01-11 19:29:49 +03:00
levlam
5ccb67f28e Improve MessageForwardInfo field names. 2024-01-11 19:24:01 +03:00
levlam
d59abc099d Add MessageForwardInfo getters. 2024-01-11 19:11:16 +03:00
levlam
3ba660a655 Add some MessageForwardInfo methods. 2024-01-11 18:46:10 +03:00
levlam
3cb8ef9807 Store MessageForwardInfo as the whole. 2024-01-11 18:20:53 +03:00
levlam
2ff1a93d5b Add td_api::cancelRecoveryEmailAddressVerification. 2024-01-11 14:51:29 +03:00
levlam
562374088c Remove setTdlibParameters.enable_storage_optimizer/ignore_file_names parameters in favor of "use_storage_optimizer" and "ignore_file_names" options. 2024-01-11 13:54:23 +03:00
levlam
bf6345248f Return keywords in searchEmojis. 2024-01-05 15:21:35 +03:00
levlam
9e0bb80dcf Don't return common key prefix in SqliteKeyValue::get_by_prefix. 2024-01-05 15:11:49 +03:00
levlam
f4bafbdc86 Add separate td_api::getKeywordEmojis. 2024-01-05 14:36:01 +03:00
levlam
4dc89d0b8d Add StickersManager::prepare_search_emoji_query. 2024-01-05 14:20:00 +03:00
levlam
0b5b4b8dab Add synchronous td_api::getCountryFlagEmoji. 2024-01-05 13:42:46 +03:00
levlam
a9d1269567 Add more information to chatBoostFeatures. 2024-01-02 17:32:30 +03:00
levlam
8e2ef00696 Apply message self-destruct type changes for being sent messages. 2024-01-02 15:38:43 +03:00
levlam
052f6cb20c Allow to send self-destructing video notes and voice notes. 2024-01-02 14:51:16 +03:00
levlam
139b61e4b6 Add td_api::messageExpiredVideoNote and td_api::messageExpiredVoiceNote. 2024-01-02 14:27:11 +03:00
levlam
be8b21cdf4 Update layer to 171. 2024-01-02 03:23:51 +03:00
levlam
2b0d3f6091 Improve error message. 2024-01-25 17:33:11 +03:00
levlam
90cc7a5f9c Improve logging. 2024-01-24 16:31:47 +03:00
levlam
741c80cf13 Fix log message. 2024-01-24 16:06:43 +03:00
levlam
fbd6f27d7b Don't reload config on restart for bots. 2024-01-24 15:38:11 +03:00
levlam
a262f0a5f7 Avoid some initialization for bots. 2024-01-24 15:24:16 +03:00
levlam
e7fbcd9d2a Call G()->is_test_dc() only once. 2024-01-24 15:01:14 +03:00
levlam
f24bc41596 Move setting of default option values from ContactsManager to OptionManager. 2024-01-24 14:59:09 +03:00
levlam
13c94c7731 Don't init BackgroundManager for bots. 2024-01-24 14:48:17 +03:00
levlam
0c0c24e7d0 Don't log updateOption for bots. 2024-01-24 14:40:56 +03:00
levlam
5bbfc1cf5d Update premium options on launch only for regular users. 2024-01-23 21:03:04 +03:00
levlam
3cb6ed90db Directly use thread-unsafe key value when initializing it. 2024-01-23 20:36:29 +03:00
levlam
0c8e63c2f5 Optimize set_default_integer_option. 2024-01-23 20:29:31 +03:00
levlam
8d2d2de0d0 Add set_default_integer_option lambda-helper. 2024-01-23 20:16:26 +03:00
levlam
0190bf2b1f Use for_each instead of a temporary map in OptionManager::OptionManager. 2024-01-23 19:42:28 +03:00
levlam
58ea5e22bc Add KeyValueSyncInterface::for_each. 2024-01-23 19:26:43 +03:00
levlam
cd3cc873f0 Fix usage of unsupported chat identifier. 2024-01-23 19:05:39 +03:00
levlam
60f2f75b78 Minor improvements. 2024-01-22 13:11:04 +03:00
levlam
ee8f00c7a1 Improve InternalLinkType documentation. 2024-01-22 12:55:18 +03:00
levlam
1f116cdd99 Reuse the same PublicRsaKeySharedMain object. 2024-01-22 02:52:58 +03:00
levlam
0dd1934090 Use separate implementations for main and CDN RSA keys. 2024-01-22 02:15:26 +03:00
levlam
e52d08da74 Use PublicRsaKeyInterface in AuthDataShared. 2024-01-22 01:55:16 +03:00
levlam
d5c3456085 Remove default NerQueryDispatcher constructor. 2024-01-22 01:39:31 +03:00
levlam
b4c075593e Log received message info. 2024-01-21 01:50:20 +03:00
levlam
674b380bd5 Never ask for ack for service queries. 2024-01-21 01:31:24 +03:00
levlam
942e5fc613 Add LambdaPromise debug. 2024-01-20 12:54:17 +03:00
levlam
1147dfc6fb Remove unused format::lambda. 2024-01-20 12:05:49 +03:00
levlam
09c6bad8bd Remove pinned message notification only if new pinned message is added to Mentions. 2024-01-20 03:30:10 +03:00
levlam
2a9393ff7a Add "process_pinned_messages_as_mentions" option to allow keep previous behavior. 2024-01-19 22:23:26 +03:00
levlam
121fbe535f Create dependent chats right after Message object creation. 2024-01-18 15:21:44 +03:00
levlam
021c0bd02d Improve logging. 2024-01-18 14:59:53 +03:00
levlam
e5f9e4c400 Decrease UPDATE_APPLY_WARNING_TIME and improve logging. 2024-01-17 16:50:08 +03:00
levlam
14c93b1772 Fix added_message_full_id initialization. 2024-01-16 21:40:25 +03:00
levlam
6d910597e5 Delete message from map after using. 2024-01-16 21:36:24 +03:00
levlam
c2277a1044 Add source to get_user_full_force. 2024-01-15 14:12:00 +03:00
Liru Færs
0f98d76683
Fix DialogActionManager::send_dialog_action in secret chats (#2756)
* Fix DialogActionManager::send_dialog_action in secret chats 

The code in `DialogActionManager::send_dialog_action` made the assumption that since we'd either have early returned or `DialogManager::have_input_peer` would be true, and therefore the else block of the conditional, which intended to set input_peer, should have done so successfully.

However, `DialogManager::have_input_peer` will return true for secret chats when `contacts_manager->have_input_encrypted_peer`
And `DialogManager::get_input_peer` will return a `nullptr` for secret chats by design (I believe this is because they operate using structures that are currently incompatible)

This should fix the root of a crash that happens when typing in or sending messages to secret chats on:
Telegram X 0.26.4.1678-arm64-v8a (99b10675)
TDLib: 1.8.23 (tdlib/td@4bafdc2)

* Move CHECK below SecretChat case instead per feedback
2024-01-15 01:02:56 +03:00
levlam
58c457ab5f Add NotificationManager::parse_push_notification_attach. 2024-01-14 23:05:35 +03:00
levlam
3e8d368ba5 Add NotificationManager::add_push_notification_user. 2024-01-14 22:52:52 +03:00
levlam
ffdb02374e Simplify Manager actor reset. 2024-01-13 02:08:28 +03:00
levlam
916e5de43e Simplify code for manager reset. 2024-01-13 01:28:15 +03:00
levlam
96fee82699 Use separate initialization functions for different Manager types. 2024-01-13 00:59:17 +03:00
levlam
8b97d2e8e4 Move binlog events processing to Td::process_binlog_events. 2024-01-13 00:42:49 +03:00
levlam
0aa8816c28 Don't always treat pins as mentions. 2024-01-12 18:15:19 +03:00
levlam
4bafdc2b71 Fix MessagesManager::drop_dialog_last_pinned_message_id. 2024-01-12 12:16:51 +03:00
levlam
5d7c69d0d1 Remove CallManager::Update typedef. 2024-01-11 13:36:38 +03:00
levlam
9413360255 Improve SplitSource.php. 2024-01-11 02:08:43 +03:00
levlam
d029eff807 Minor improvements. 2024-01-11 00:12:16 +03:00
levlam
21418140bd Fix removal of message reply for failed to send forwarded messages. 2024-01-10 22:01:39 +03:00
levlam
a10f03cde1 Add sanity check. 2024-01-10 21:41:13 +03:00
levlam
5e0301db45 Improve fatal error message on app downgrade. 2024-01-10 21:20:17 +03:00
levlam
17a412a04a Don't delete notifications when initializing last_new_message_id. There should be no old notifications anyway (2). 2024-01-10 21:08:43 +03:00
levlam
bc5b1f4e19 Remove unavailable messages from the list of linked messages. 2024-01-10 20:22:45 +03:00
levlam
509908edda Don't register users/channels in unknown channels. 2024-01-10 20:07:56 +03:00
levlam
7f844b637f Correctly update self speculative channel status while joining it. 2024-01-10 18:03:41 +03:00
levlam
1fa64892e1 Don't count non-member creator in administrator count. 2024-01-10 17:49:17 +03:00
levlam
44eba3d214 Combine JoinChannel queries. 2024-01-10 17:42:14 +03:00
levlam
faee94b680 Apply message auto-delete time from chat creation message. 2024-01-10 17:20:13 +03:00
levlam
4d51b2c875 Move create_new_chat/create_new_channel to ContactsManager. 2024-01-10 17:09:09 +03:00
levlam
a409af0973 Move migrate_dialog_to_megagroup to ContactsManager. 2024-01-10 15:57:19 +03:00
levlam
1bc8e90c10 Move create_new_secret_chat to ContactsManager. 2024-01-10 15:20:16 +03:00
levlam
da031b3faa Allow \r and other empty entities as a separator between MarkdownV2 blockquotes. 2024-01-10 14:36:27 +03:00
levlam
ce8a4b6d21 tg_cli: use preset message_thread_id_ in requests where it is optional. 2024-01-10 13:16:37 +03:00
levlam
c6154c43aa Don't store message interaction info for bots. 2024-01-09 10:59:24 +03:00
levlam
3817f2cb6b Minor improvements. 2024-01-08 19:26:34 +03:00
levlam
7b6ce8b822 Move reload_dialog_info to DialogManager. 2024-01-08 19:20:22 +03:00
levlam
9a90089879 Move check_dialog_username to DialogManager. 2024-01-08 19:14:41 +03:00
levlam
466c841b4e Move send_update_add_chat_members_privacy_forbidden to DialogParticipantManager. 2024-01-08 18:57:44 +03:00
levlam
127b7ad086 Add DialogParticipantManager::speculative_add_channel_user. 2024-01-08 18:50:18 +03:00
levlam
b1d72276a7 Move set_channel_participant_status and similar methods to DialogParticipantManager. 2024-01-08 18:44:13 +03:00
levlam
9660a7f2b1 Move set_dialog_participant_status and similar methods to DialogParticipantManager. 2024-01-08 18:15:21 +03:00
levlam
50b5a6e9bf Move channel participant cache to DialogParticipantManager. 2024-01-08 18:03:04 +03:00
levlam
bba173ea7d Move get_channel_participant to DialogParticipantManager. 2024-01-08 17:45:04 +03:00
levlam
f8565154a1 Move get_dialog_participant to DialogParticipantManager. 2024-01-08 17:35:24 +03:00
levlam
f1a4579e67 Move bot chat member updates to DialogParticipantManager. 2024-01-08 17:27:32 +03:00
levlam
82e59914cd Minor improvements. 2024-01-08 15:42:21 +03:00
levlam
d832d5a70f Move chat administrators to DialogParticipantManager. 2024-01-08 15:23:16 +03:00
levlam
d1251e47a6 Move chat join request processing to DialogParticipantManager. 2024-01-08 14:36:18 +03:00
levlam
b579fcd3e0 Rename DialogOnlineMemberManager to DialogParticipantManager. 2024-01-08 14:22:44 +03:00
levlam
55faa7ad0b Fix parameter name. 2024-01-08 14:15:15 +03:00
levlam
e4c816d33c Move methods for chat invite link management to DialogInviteLinkManager. 2024-01-08 14:09:58 +03:00
levlam
5a1b4b8d71 Move DialogAccessByInviteLink to DialogInviteLinkManager. 2024-01-08 13:40:28 +03:00
levlam
409778b760 Move check/join by chat invite link to DialogInviteLinkManager. 2024-01-08 13:25:31 +03:00
levlam
ebf2f95681 Add DialogInviteLinkManager. 2024-01-08 12:43:31 +03:00
levlam
90b8acff67 Add and use BotCommands::update_all_bot_commands. 2024-01-08 01:44:58 +03:00
levlam
b4ac2653cd Move delete_dialog to DialogManager. 2024-01-08 01:27:49 +03:00
levlam
64c646b9de Use resolve_dialog_username internally. 2024-01-08 00:31:07 +03:00
levlam
a2c6f4aa7c Move resolved usernames to DialogManager. 2024-01-07 23:45:33 +03:00
levlam
dc3929fede Remove is_unsent_animated_emoji_click proxy function. 2024-01-07 01:08:41 +03:00
levlam
b684039566 Move some methods to DialogActionManager. 2024-01-07 00:46:36 +03:00
levlam
4bc9f8d72e Add DialogActionManager. 2024-01-06 22:56:28 +03:00
levlam
bd7f900df8 Move relevant methods to MessageImportManager. 2024-01-06 22:45:27 +03:00
levlam
f5a776b67c Add MessageImportManager. 2024-01-06 22:06:52 +03:00
levlam
cb6c15b9c9 Explicitly check message content before trying to register it for bots. 2024-01-05 18:43:53 +03:00
levlam
cb013c999a Don't keep restriction reasons for bots. 2024-01-05 18:24:35 +03:00
levlam
99a6c04dd3 Move online_member_dialogs out of User. 2024-01-05 12:33:53 +03:00
levlam
884a16f1ed Partly move report_dialog to DialogManager. 2024-01-04 22:46:13 +03:00
levlam
c24bd49cce Move set_dialog_photo to DialogManager. 2024-01-04 20:44:12 +03:00
levlam
e5f0b33508 Move toggle_dialog_has_protected_content to DialogManager. 2024-01-04 20:25:41 +03:00
levlam
17012dff1c Move set_dialog_permissions to DialogManager. 2024-01-04 20:20:18 +03:00
levlam
fd45eb84f5 Move set_dialog_title to DialogManager. 2024-01-04 20:15:29 +03:00
levlam
57f1b32617 Move remove_secret_chat_dialog_ids to DialogId. 2024-01-04 19:55:48 +03:00
levlam
c0a0f7de07 Move on_dialog_info_full_invalidated to DialogManager. 2024-01-04 19:52:31 +03:00
levlam
a719ed42be Simplify conditions for reloading chat full info. 2024-01-04 19:47:27 +03:00
levlam
249598a711 Move get_common_dialogs to CommonDialogManager. 2024-01-04 19:30:58 +03:00
levlam
8d7058109c Add CommonDialogManager. 2024-01-04 19:20:14 +03:00
levlam
2c6917d044 Simplify RecentDialogList::removed_dialog_ids_ implementation. 2024-01-04 19:10:15 +03:00
levlam
f43807ebbf Don't try to remove chat from recent for bots. 2024-01-04 19:06:50 +03:00
levlam
3003679192 Move online member count to DialogOnlineMemberManager. 2024-01-04 18:30:12 +03:00
levlam
211071970e Add DialogOnlineMemberManager. 2024-01-04 18:02:36 +03:00
levlam
52b8e295ca Minor include improvements. 2024-01-04 16:46:53 +03:00
levlam
6d1f6e250f Add DialogManager::is_dialog_removed_from_dialog_list. 2024-01-04 16:32:04 +03:00
levlam
d24a0eda1d Move get_peers_dialog_ids to DialogManager. 2024-01-04 16:24:19 +03:00
levlam
b97fa08e62 Move get_input_dialog_id to DialogManager. 2024-01-04 16:20:15 +03:00
levlam
32898dbe88 Move get_chat_ids_object and get_chats_object to DialogManager. 2024-01-04 16:13:20 +03:00
levlam
ebda6f1364 Use DialogManager::get_my_dialog_id. 2024-01-04 15:49:02 +03:00
levlam
eb5a37e927 Add DialogManager::force_create_dialog. 2024-01-04 15:38:01 +03:00
levlam
978be7206f Use DialogManager::have_dialog_force. 2024-01-04 15:26:42 +03:00
levlam
b2fccc7d9c Move ContactsManager proxy methods to DialogManager. 2024-01-03 23:07:50 +03:00
levlam
36f6a97b58 Fix setting of global DialogFilter manager. 2024-01-02 16:43:09 +03:00
levlam
7897ab1ada Add empty DialogManager. 2024-01-02 16:22:25 +03:00
levlam
2bfe13f832 Set parser error if invalid reaction is stored in database. 2024-01-02 03:03:39 +03:00
levlam
0e2b7eab27 Ensure that messageReaction.total_count isn't less than the number of recent users. 2024-01-02 02:54:57 +03:00
levlam
d963044eb9 Update copyright year. 2024-01-01 03:07:21 +03:00
levlam
962f7ec17b Remove unused gen_git_commit_h scripts. 2023-12-31 00:04:55 +03:00
levlam
6d79dd9ea8 Keep forward info for audios and stories forwarded to saved messages. 2023-12-30 22:14:50 +03:00
levlam
c4fe2defc6 Keep source files sorted in CMakeLists.txt. 2023-12-29 14:09:50 +03:00
AYMEN Mohammed
fb27c7c0b4 Fix typo. 2023-12-29 13:51:37 +03:00
Fela
c73222b33b Pass is_pinned while creating event log messages 2023-12-29 13:51:24 +03:00
levlam
27c3eaeb49 Update version to 1.8.23. 2023-12-28 00:36:12 +03:00
levlam
45b6506cbf Ignore user in unclaimed giveaway boost. 2023-12-27 22:38:57 +03:00
levlam
04a6ab8959 Improve documentation of chat boost features. 2023-12-26 23:11:30 +03:00
levlam
49dc00ade2 Remove unused forward declaration. 2023-12-26 21:56:51 +03:00
levlam
6e410b849c Improve documentation. 2023-12-26 21:52:53 +03:00
levlam
e3a01fddd7 Improve includes. 2023-12-26 21:39:48 +03:00
levlam
571fbd68aa Add td_api::openChatSimilarChat. 2023-12-26 21:24:04 +03:00
levlam
4a45265926 Add td_api::internalLinkTypePremiumGift. 2023-12-26 21:01:33 +03:00
levlam
65903180a4 Add td_api::chatBoostFeatures. 2023-12-26 20:31:53 +03:00
levlam
54bd830f49 Add td_api::getChatBoostLevelFeatures. 2023-12-26 20:20:41 +03:00
levlam
0edbb14ad2 Improve setChatAccentColor documentation. 2023-12-26 19:22:27 +03:00
levlam
969f4a764f Remove "channel_custom_accent_color_boost_level_min" option. 2023-12-26 19:20:06 +03:00
levlam
e4038723b2 Support internal min boost level options. 2023-12-26 19:12:00 +03:00
levlam
cd27c67beb Pass-through PREMIUM_SUB_ACTIVE_UNTIL_* errors. 2023-12-26 18:41:41 +03:00
levlam
7a2e2c4ee0 Add paymentProviderSmartGlocal.tokenize_url. 2023-12-26 18:33:02 +03:00
levlam
015976e4f1 Fix story area type. 2023-12-26 18:04:31 +03:00
levlam
aa0db44a9a Improve documentation. 2023-12-26 18:03:25 +03:00
levlam
91013ee921 Add "chat_available_reaction_count_max" option. 2023-12-26 17:11:34 +03:00
levlam
45eca4e8d2 Delete td_api::addApplicationChangelog. 2023-12-26 16:51:58 +03:00
levlam
07bf49d42e Improve logging in need_channel_difference_to_add_message. 2023-12-26 15:54:40 +03:00
levlam
2a685bc9ab Early process received users and chats. 2023-12-26 15:52:17 +03:00
levlam
c3c14ee65e Add td_api::getChatStoryInteractions. 2023-12-26 14:24:42 +03:00
levlam
e83e1ba095 Support telegram_api::StoryReaction. 2023-12-26 13:57:43 +03:00
levlam
8655fbe5d7 Add getStoryInteractions.prefer_forwards. 2023-12-26 13:47:24 +03:00
levlam
b196d38a68 Get channel difference if needed before processing story views list. 2023-12-26 13:11:22 +03:00
levlam
8900038324 Add and use generic MessagesManager::get_channel_differences_if_needed. 2023-12-26 12:02:53 +03:00
levlam
53cf01e7bf Support various types of story interactions. 2023-12-25 22:07:02 +03:00
levlam
be785dd673 Improve StoryViewer constructor. 2023-12-25 17:30:26 +03:00
levlam
05651f587d Add StoryViewer::is_valid. 2023-12-25 16:34:38 +03:00
levlam
964663948d Improve StoryViewer getters. 2023-12-25 16:32:41 +03:00
levlam
a4ed86c44e Update BlockList in StoryViewers::StoryViewers. 2023-12-25 15:52:03 +03:00
levlam
b3d19e51e5 Rename storyViewer to storyInteraction. 2023-12-25 15:34:47 +03:00
levlam
ca2cf0e25c Add storyViewers.total_forward_count. 2023-12-25 15:10:48 +03:00
levlam
c4efc0e2e0 Add td_api::setChatEmojiStatus. 2023-12-25 14:49:22 +03:00
levlam
b1db06d627 Fix update of channel emoji status. 2023-12-25 03:01:45 +03:00
levlam
5979276116 Enable updateChatAvailableReactions for bots. 2023-12-25 02:50:20 +03:00
levlam
aab1bf4fa5 Check for default channel statuses in StickersManager::is_default_emoji_status. 2023-12-24 02:38:17 +03:00
levlam
1494d5fcdf Add td_api::getDisallowedChatEmojiStatuses. 2023-12-24 02:30:49 +03:00
levlam
8090aac1c1 Add stickerSet.is_allowed_as_chat_emoji_status. 2023-12-24 01:23:15 +03:00
levlam
02159a2fce Fix spelling. 2023-12-23 02:16:03 +03:00
levlam
d79114691c Replace td_api::messageUserShared with td_api::messageUsersShared. 2023-12-22 19:17:58 +03:00
levlam
66c6e706ab Replase td_api::shareUserWithBot with td_api::shareUsersWithBot. 2023-12-22 18:47:23 +03:00
levlam
590b3f3c25 Replace td_api::keyboardButtonTypeRequestUser with td_api::keyboardButtonTypeRequestUsers. 2023-12-22 18:06:40 +03:00
levlam
9f9884f2f5 Update setChatBackground documentation. 2023-12-22 13:36:46 +03:00
levlam
f07d21ac6b Add td_api::getDefaultChatEmojiStatuses. 2023-12-22 12:29:12 +03:00
levlam
e2747b6c76 Add td_api::getThemedChatEmojiStatuses. 2023-12-21 22:44:59 +03:00
levlam
40b585d74f Support channel emoji status. 2023-12-21 21:05:42 +03:00
levlam
7f6bdcd42c Add channel.boost_level. 2023-12-21 20:08:30 +03:00
levlam
5cb6ca27cc Add Chat.emoji_status. 2023-12-21 20:01:26 +03:00
levlam
8e85ef9e40 Don't mark background as inited for channels. 2023-12-21 19:10:05 +03:00
levlam
fabcce43c6 Update channel background from ChannelFull. 2023-12-21 19:08:06 +03:00
levlam
88b2781685 Add min_chat_boost_level to accentColor/profileAccentColor. 2023-12-21 18:48:15 +03:00
levlam
022c227515 Add td_api::suggestedActionGiftPremiumForChristmas. 2023-12-21 18:16:32 +03:00
levlam
24611b1fd5 Improve messagePremiumGiveawayWinners documentation. 2023-12-21 17:25:39 +03:00
levlam
b7f5949b98 Add is_supported_reply_message_content. 2023-12-21 17:24:21 +03:00
levlam
092144cf43 Update background_custom_emoji_id documentation. 2023-12-19 19:34:24 +03:00
levlam
9d0bbc4d35 Improve inputStoryAreas documentation. 2023-12-19 19:25:59 +03:00
levlam
14b81a2d48 Always apply background from new message in groups and channels. 2023-12-19 16:24:06 +03:00
levlam
93aa765f44 Add td_api::backgroundTypeChatTheme for boosted chats. 2023-12-19 16:00:50 +03:00
levlam
b3ce27c4ea Add separate deleteDefaultBackground method. 2023-12-19 14:38:37 +03:00
levlam
0fc3b3adc6 Improve names of background-related methods. 2023-12-19 14:33:21 +03:00
levlam
325f56dfe0 Improve name of updateDefaultBackground update. 2023-12-19 14:21:46 +03:00
levlam
b4ea9f8a18 Improve premiumGiftCodeInfo documentation. 2023-12-19 13:31:02 +03:00
levlam
855d6bf568 Support getPremiumGiveawayInfo for GiveawayWinners messages. 2023-12-19 13:07:41 +03:00
levlam
fd0135393c Process chats from stories.storyViewsList. 2023-12-19 13:04:21 +03:00
levlam
0b51acefe9 Add td_api::messagePremiumGiveawayWinners. 2023-12-18 21:03:11 +03:00
levlam
299b87c524 Add td_api::chatEventEmojiStatusChanged. 2023-12-18 16:38:40 +03:00
levlam
6b85c09d14 Add td_api::chatEventBackgroundChanged. 2023-12-18 16:30:52 +03:00
levlam
c03650a920 Add td_api::chatEventProfileAccentColorChanged. 2023-12-18 16:03:15 +03:00
levlam
6b0e161fa2 Combine td_api::chatEventAccentColorChanged and td_api::chatEventBackgroundCustomEmojiChanged. 2023-12-18 16:00:01 +03:00
levlam
9171588824 Add class PeerColor. 2023-12-18 15:51:11 +03:00
levlam
67422ffb47 Rename StoryPublicForward to PublicForward. 2023-12-18 14:59:50 +03:00
levlam
5725cf0388 Add td_api::storyAreaTypeMessage. 2023-12-18 14:40:11 +03:00
levlam
895150e649 Add optional currency information to messagePremiumGiftCode. 2023-12-18 13:30:21 +03:00
levlam
1393033fdf Add td_api::setChatProfileAccentColor. 2023-12-17 23:34:58 +03:00
levlam
d6423f60be Remove separate UpdateProfileColorQuery. 2023-12-17 23:12:03 +03:00
levlam
7ceccad807 Support profile color and custom emoji in chat. 2023-12-17 22:54:55 +03:00
levlam
16d0c3c61b Use combined updateChatAccentColors. 2023-12-16 11:49:26 +03:00
levlam
e4e76a7483 Add td_api::setMessageReactions for bots. 2023-12-15 14:51:26 +03:00
levlam
cc37a0c937 Add td_api::updateMessageReactions for bots. 2023-12-14 23:44:31 +03:00
levlam
00aff8f557 Add td_api::updateMessageReaction for bots. 2023-12-14 19:55:53 +03:00
levlam
58e8b7c97e Support creation of giveaways with public list of winners and additional prize description. 2023-12-05 13:45:32 +03:00
levlam
c6ce44815e Update layer to 169. 2023-12-05 12:30:12 +03:00
levlam
15132a398f Remove check in backgrounf parsing. 2023-12-22 16:48:16 +03:00
levlam
3e42417a0f Log results of message deletion. 2023-12-22 16:31:53 +03:00
Sergey Akentev
8951949ece Change deprecated exec_program to execute_process in iOS.cmake
See CMP0153
2023-12-22 15:39:13 +03:00
levlam
5b8fff9643 Allow messagePremiumGiftCode.creator_id == null. 2023-12-22 12:51:58 +03:00
levlam
d60bb8da91 Add MessagesManager::update_replied_by_message_count. 2023-12-21 17:10:09 +03:00
levlam
bd1768954a Add and use MessagesManager::get_message_reply_to_random_id. 2023-12-20 23:25:54 +03:00
levlam
4dbcfce77d Randomly choose session among sessions with the same minimum query count. 2023-12-19 21:01:32 +03:00
levlam
15b8ad5c66 Add MediaArea::get_input_media_areas. 2023-12-18 14:24:07 +03:00
levlam
50f20c8a0c Assign message identifier in create_message_to_send. 2023-12-17 01:06:40 +03:00
levlam
08222894e9 Check link types in alphabetical order. 2023-12-16 23:45:45 +03:00
levlam
a815bd74a1 Pass some parameters as const reference. 2023-12-15 00:11:59 +03:00
levlam
53ee8caf37 Simplify QTS update processing. 2023-12-14 23:27:46 +03:00
levlam
0072ff225b Add static methods for processing of vector<ReactionType>. 2023-12-14 18:46:52 +03:00
levlam
0a53e5ad0e Set bot online timeout right after authorization. 2023-12-14 15:59:16 +03:00
levlam
2bf1dcd6eb Add source to get_channel_difference_if_needed. 2023-12-13 19:48:11 +03:00
levlam
542271a1fd Don't save get_id() to a used-once variable before switch. 2023-12-12 23:20:41 +03:00
levlam
dce778442c Allow 0 as giveaway_message_id in messagePremiumGiveawayCompleted. 2023-12-11 00:44:47 +03:00
levlam
1a50ec474c Use tdjson.dll only on Windows. 2023-12-10 14:05:35 +03:00
levlam
c257615f9a Remove now unused function is_hidden_data_entity. 2023-12-10 13:37:32 +03:00
levlam
0b1a1855a9 Use full path for tdjson.dll in Python example. 2023-12-10 13:13:07 +03:00
levlam
745c40855a Exclude installed sticker sets from searchStickerSets response. 2023-12-09 23:14:19 +03:00
levlam
d8eab25e82 Allow to use addChatMembers with one user in basic groups. 2023-12-08 14:30:01 +03:00
levlam
559cbe5de9 Always update premium-dependent options. 2023-12-08 12:57:13 +03:00
levlam
44844e1c19 Improve link preview options comparison. 2023-12-07 21:16:37 +03:00
levlam
f4f46c9a79 Don't try to process stories inside message content by bots. 2023-12-07 13:34:37 +03:00
levlam
a7c81ae21b Always extract web_page_url for bots. 2023-12-07 12:48:33 +03:00
levlam
b210e79f97 Save link preview URL if size of the media is fixed or message text is empty. 2023-12-06 12:57:49 +03:00
levlam
0f4e01bde3 Keep reply content if it has link preview options. 2023-12-06 12:28:37 +03:00
levlam
ef68428e01 Improve documentation of only_new_members. 2023-12-05 17:03:21 +03:00
levlam
4ac5708135 Remove redundant is_valid checks before adding an identifier as dependency. 2023-12-04 22:18:08 +03:00
levlam
f08b63268a Support more cases for min-users and min-channels. 2023-12-04 22:13:25 +03:00
levlam
85c8c19b7f Fix profileAccentColor documentation. 2023-12-04 19:15:15 +03:00
levlam
4c052a5efa Don't remove whitespace-only entities. 2023-12-04 18:33:40 +03:00
levlam
9a9e3be8cf Trim quote from the replied message. 2023-12-04 16:27:15 +03:00
levlam
99f9b78819 Support messagePremiumGiveawayCompleted in getRepliedMessage. 2023-12-04 12:34:58 +03:00
levlam
9577a457c5 Improve documentation. 2023-12-04 12:24:26 +03:00
levlam
1b42476416 Add sanity checks. 2023-12-04 11:39:48 +03:00
levlam
3f00bebf63 Add missing checks fpr database existence. 2023-12-03 13:18:33 +03:00
levlam
4c1f6d6608 Fix misprint by @AYMENJD. 2023-12-02 22:19:48 +03:00
levlam
24893faf75 Update version to 1.8.22. 2023-12-01 23:19:05 +03:00
levlam
7728c1deb3 Don't hide sender of a story being reposted. 2023-12-01 23:10:59 +03:00
levlam
d1ce646e61 Require less rights for channel story statistics. 2023-12-01 22:36:20 +03:00
levlam
8ab0a152cd Just delete chat background if revert failed. 2023-12-01 11:56:30 +03:00
levlam
762c224c10 Add deleteChatBackground.restore_previous. 2023-12-01 01:06:54 +03:00
levlam
330088d9f8 Add separate td_api::deleteChatBackground method. 2023-12-01 00:20:11 +03:00
levlam
f05f2a67f1 Add BackgroundManager::get_background_dialog method. 2023-12-01 00:14:25 +03:00
levlam
072f811a9c Apply chat background set by the other user. 2023-11-30 21:49:32 +03:00
levlam
6f3180aeaf Don't warn about pre-release messages. 2023-11-30 21:11:19 +03:00
levlam
e2ce0e7a0b Keep logging only if the chat has active stories. 2023-11-30 20:32:16 +03:00
levlam
fc8bc0a026 Improve method names. 2023-11-30 20:13:49 +03:00
levlam
da1f23a6f9 Fix RecommendedDialogs::parse. 2023-11-30 19:37:48 +03:00
levlam
392f5e24b3 Improve supergroup.member_count documentation. 2023-11-30 19:08:46 +03:00
levlam
ecadb90ac8 Improve documentation. 2023-11-30 18:43:38 +03:00
levlam
9096e646b8 Minor improvements. 2023-11-30 18:26:33 +03:00
levlam
1604ee7b1d Improve includes. 2023-11-30 18:13:23 +03:00
levlam
9bf9bf767d Add td_api::getStoryPublicForwards. 2023-11-30 17:21:56 +03:00
levlam
7afab3e805 Reduce total timeout limit for speechRecognition. 2023-11-30 13:50:46 +03:00
levlam
8859f40e89 Allow to specify original story in sendStory. 2023-11-29 22:10:51 +03:00
levlam
238c0e901f Load recommended channels from database. 2023-11-29 19:35:27 +03:00
levlam
dcad0f413e Add td_api::story.repost_info. 2023-11-29 19:22:54 +03:00
levlam
da0d999c52 Add td_api::getSimilarChatCount. 2023-11-29 15:31:33 +03:00
levlam
85b06f9614 Add ContactsManager::finish_load_channel_recommendations_queries. 2023-11-29 15:11:55 +03:00
levlam
fa91aeb065 Add ContactsManager::fail_load_channel_recommendations_queries. 2023-11-29 15:04:21 +03:00
levlam
f792e9d45e Don't check permissions for added local messages. 2023-11-29 14:17:49 +03:00
levlam
5a40d432ea Fix premium feature names. 2023-11-29 13:33:14 +03:00
levlam
ec98830565 Improve error messages. 2023-11-29 01:06:13 +03:00
levlam
341fb7c04f Add td_api::textQuote. 2023-11-28 18:24:07 +03:00
levlam
c5288258d4 Add class inputTextQuote. 2023-11-28 18:16:04 +03:00
levlam
c9e83daec6 Allow to reset accent_color_id to default. 2023-11-28 16:17:51 +03:00
levlam
9fbdba456a Add td_api::setProfileAccentColor. 2023-11-28 16:12:21 +03:00
levlam
45ca900759 Add user.profile_accent_color_id/profile_background_custom_emoji_id. 2023-11-28 15:45:39 +03:00
levlam
fb03b92fa2 Don't warn if entity lanaguage code is added by the server. 2023-11-28 14:57:30 +03:00
levlam
d519262785 Document that supergroup.member_count is available for chats returned by getSimilarChats. 2023-11-28 14:36:33 +03:00
levlam
3ec308589d Fix misprint. 2023-11-28 14:35:39 +03:00
levlam
ea9e99407f Add "chat_boost_level_max" option. 2023-11-28 14:31:43 +03:00
levlam
00f09dae62 Add td_api::premiumLimitTypeSimilarChatCount. 2023-11-28 14:22:08 +03:00
levlam
dd5bd9fff6 Add td_api::premiumFeatureBackgroundForBoth. 2023-11-28 14:11:46 +03:00
levlam
e51da2da32 Update name of premiumFeatureAccentColor. 2023-11-28 14:06:37 +03:00
levlam
16e3eb2a8a Check color validness. 2023-11-27 18:40:02 +03:00
levlam
86a78f725f Log updateProfileAccentColors and updateAccentColors on one line. 2023-11-27 18:12:06 +03:00
levlam
60eb989657 Add td_api::updateProfileAccentColors. 2023-11-27 18:08:45 +03:00
levlam
fbcd4c7198 Use help.getPeerColors to update accent colors. 2023-11-27 16:35:27 +03:00
levlam
d08796fade Reload chat themes with other data. 2023-11-27 13:34:14 +03:00
levlam
bf9c8c81c7 Update FreeBSD build instructions to FreeBSD 13. 2023-11-27 13:21:56 +03:00
levlam
a32b11de98 Delete similar chats from database when losing read access to the chat. 2023-11-25 21:44:54 +03:00
levlam
5b6c024aaa Support partial lists for recommended channels. 2023-11-24 13:53:10 +03:00
levlam
f0debd7bb8 Don't update cooldown date with wait time if it is initialized already. 2023-11-24 13:28:39 +03:00
levlam
1e5db44c0d Support telegram_api::updatePeerWallpaper.wallpaper_overridden. 2023-11-23 23:12:59 +03:00
levlam
18377ae3e7 Add userFullInfo.set_chat_background. 2023-11-23 23:08:53 +03:00
levlam
4d98fd1a44 Send updateSpeechRecognitionTrial when it resets. 2023-11-23 16:16:39 +03:00
levlam
40142a45a0 Update tdweb documentation. 2023-11-23 15:50:07 +03:00
levlam
2dd9da30be Improve updateSpeechRecognitionTrial. 2023-11-23 15:35:54 +03:00
levlam
50a360c147 Update trial parameters after speech recognition. 2023-11-23 14:49:05 +03:00
levlam
fa6b61d764 Handle full messages.transcribedAudio. 2023-11-23 14:12:27 +03:00
levlam
ec109dfd4a Move speech recognition to TranscriptionManager. 2023-11-23 13:25:56 +03:00
levlam
ab39c96b2c Move transcription update subscription to TranscriptionManager. 2023-11-21 20:32:23 +03:00
levlam
1cdb210ed1 Save speech recognition trial parameters to binlog. 2023-11-21 20:08:05 +03:00
levlam
6793fa6aae Add struct TrialParameters. 2023-11-21 19:51:07 +03:00
levlam
922a0428ed Add TranscriptionManager::get_current_state. 2023-11-21 19:31:27 +03:00
levlam
e5f457c30f Add updateSpeechRecognitionTrial. 2023-11-21 19:27:25 +03:00
levlam
a83f90448f Add empty TranscriptionManager. 2023-11-21 15:14:26 +03:00
levlam
b55af58a69 Cache channel recommendations in database. 2023-11-21 14:13:06 +03:00
levlam
cf882ccc77 Add ContactsManager::are_suitable_recommended_dialogs. 2023-11-21 13:39:32 +03:00
levlam
21222604d0 Reload recommended chats from time to time. 2023-11-20 23:12:42 +03:00
levlam
b6bb02baad Add td_api::getSimilarChats. 2023-11-20 22:03:21 +03:00
levlam
c1352603d5 Add recent story interactions in chat statistics. 2023-11-20 19:46:49 +03:00
levlam
72bf7f0cd7 Add mean reaction and story statistics. 2023-11-20 19:16:36 +03:00
levlam
e1299c8a27 Add td_api::messageSponsorTypeWebApp. 2023-11-20 14:34:56 +03:00
levlam
2d3f202c08 Add SponsoredMessage.button_text. 2023-11-17 15:06:20 +03:00
levlam
a689c8df56 Add Story.can_get_statistics. 2023-11-17 14:58:51 +03:00
levlam
cda21980b0 Add td_api::getStoryStatistics. 2023-11-17 14:26:51 +03:00
levlam
362f43303e Add message reaction statistics. 2023-11-17 13:40:39 +03:00
levlam
f466628e20 Add reaction and story statistics for channels. 2023-11-17 13:38:31 +03:00
levlam
7165045699 Update setChatAvailableReactions documentation. 2023-11-17 12:49:10 +03:00
levlam
7ffcd56f23 Support telegram_api::updateChannelViewForumAsMessages updates. 2023-11-16 17:11:36 +03:00
levlam
a2b133ead5 Add td_api::toggleChatViewAsTopics. 2023-11-16 16:57:18 +03:00
levlam
57e9a6c5f7 Send updateChatDraftMessage when view_as_topics changes. 2023-11-16 15:19:54 +03:00
levlam
3261d9d72c Store copy of Channel.is_forum in Dialog. 2023-11-16 15:04:57 +03:00
levlam
f13dde54a2 Add Chat.view_as_topics. 2023-11-16 13:59:32 +03:00
levlam
1c8205d6de Add td_api::revertChatBackground. 2023-11-10 14:53:16 +03:00
levlam
aa7a0a6ee3 Allow to set chat background for both sides. 2023-11-10 14:40:14 +03:00
levlam
65e474ef49 Support telegram_api::updatePeerWallpaper. 2023-11-10 14:08:46 +03:00
levlam
b28200e0ef Add messageChatSetBackground.only_for_self. 2023-11-10 13:55:59 +03:00
levlam
4f6ac3cd64 Ignore reply_to_message_id if set new background. 2023-11-10 13:45:18 +03:00
levlam
95304c611c Support quote position for replies. 2023-11-10 13:29:37 +03:00
levlam
9207ba4c78 Add searchStickerSets.sticker_type. 2023-11-10 12:48:30 +03:00
levlam
9c88451e1c Add td_api::messagePremiumGiveawayCompleted. 2023-11-09 20:28:27 +03:00
levlam
d20ed201b0 Update layer to 167. 2023-11-09 19:37:26 +03:00
levlam
1a9d769923 Remove unused Query class field. 2023-11-30 15:02:05 +03:00
levlam
edc7dbb038 Forcely preload chat in some StoryManager methods. 2023-11-29 20:10:48 +03:00
levlam
1400aeeb36 Update name of linked OpenSSL DLLs in examples. 2023-11-28 21:09:44 +03:00
levlam
404761c525 Fix clang 14 compilation error. 2023-11-27 10:38:11 +03:00
levlam
7db2a64959 Update pinned vcpkg commit hash. 2023-11-26 11:10:08 +03:00
levlam
8484108704 Update supergroup.member_count documentation. 2023-11-26 00:00:55 +03:00
levlam
a84e46048d Improve ConnectionState documentation. 2023-11-25 23:54:43 +03:00
levlam
968c0ad5ae Improve documentation. 2023-11-25 23:41:21 +03:00
levlam
f03ffe1d31 Fix singular usages of "statistics". 2023-11-25 23:33:09 +03:00
levlam
e58847a5fb Allow toggleChatIsTranslatable for non-premium users. 2023-11-25 22:01:51 +03:00
levlam
794f352ed7 Add multipart/form-data tests. 2023-11-25 12:35:21 +03:00
levlam
ae9c80f6c7 Store content_length_ as int64. 2023-11-25 02:45:04 +03:00
levlam
511483e12c Fail HTTP request reading if unexpected end of data reached. 2023-11-25 02:34:37 +03:00
levlam
0d363724e5 Fix bench_http_reader. 2023-11-24 23:32:59 +03:00
levlam
c2cbb0c468 Explicitly pass content-type of the test HTTP query. 2023-11-24 22:30:06 +03:00
levlam
14ba66fb8b Explicitly disable addProxy for watchOS and Emscripten. 2023-11-24 00:09:36 +03:00
levlam
499d4eaf54 Minor improvements. 2023-11-23 08:31:56 +03:00
levlam
2d15b1c7e6 Improve allow_custom_emoji documentation. 2023-11-23 08:07:20 +03:00
1191 changed files with 26551 additions and 14165 deletions

50
.github/workflows/build.yaml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Build TDLib
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [linux/386, linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/ppc64le]
steps:
- name: Setup variables
run: |
ARCH=${{ matrix.arch }}
SAFE_ARCH=$(echo $ARCH | sed 's/\//\-/g')
echo "SAFE_ARCH=$SAFE_ARCH" >> $GITHUB_ENV
- name: Install sudo package
run: |
(apt-get update || true) 2>/dev/null
(apt-get install -y sudo || true) 2>/dev/null
sudo apt update
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Cache ccache
id: cache-ccache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ env.SAFE_ARCH }}-ccache-all
restore-keys: |
${{ runner.os }}-${{ env.SAFE_ARCH }}-ccache-
- name: Install build tools
run: sudo apt-get install -y make git zlib1g-dev libssl-dev gperf php-cli cmake clang-6.0 libc++-dev libc++abi-dev ccache
- name: Build
run: |
mkdir build
cd build
CXXFLAGS="-stdlib=libc++" CC=/usr/bin/clang-10 CXX=/usr/bin/clang++-10 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=../tdlib ..
cmake --build . --target install -- -j4
- uses: actions/upload-artifact@v2
with:
name: tdlight-${{ env.SAFE_ARCH }}
path: tdlib/lib

8
.gitignore vendored
View File

@ -4,4 +4,12 @@
**/auto/ **/auto/
docs/ docs/
tdlib/ tdlib/
.idea/
vcpkg/ vcpkg/
*.tlo
td.binlog
tg_cli.log
tg_cli.log.old

View File

@ -1024,7 +1024,7 @@ Changes in 1.5.0 (9 Sep 2019):
* Added the class `chatEventPollStopped` representing the closing of a poll in a message in the chat event log. * Added the class `chatEventPollStopped` representing the closing of a poll in a message in the chat event log.
* Added ability to specify the exact types of problems with a call in the method `sendCallRating` and * Added ability to specify the exact types of problems with a call in the method `sendCallRating` and
the new class `CallProblem`. the new class `CallProblem`.
* Changes in [tdweb](https://github.com/tdlib/td/blob/master/example/web/): * Changes in [tdweb](https://github.com/tdlight-team/tdlight/blob/master/example/web/):
- Supported non-zero `offset` and `limit` in `readFilePart`. - Supported non-zero `offset` and `limit` in `readFilePart`.
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
@ -1034,7 +1034,7 @@ Changes in 1.4.0 (1 May 2019):
* Added a [TDLib build instructions generator](https://tdlib.github.io/td/build.html), covering in details * Added a [TDLib build instructions generator](https://tdlib.github.io/td/build.html), covering in details
TDLib building on the most popular operating systems. TDLib building on the most popular operating systems.
* Added an example of TDLib building and usage from a browser. * Added an example of TDLib building and usage from a browser.
See https://github.com/tdlib/td/blob/master/example/web/ for more details. See https://github.com/tdlight-team/tdlight/blob/master/example/web/ for more details.
* Allowed to pass NULL pointer to `td_json_client_execute` instead of a previously created JSON client. * Allowed to pass NULL pointer to `td_json_client_execute` instead of a previously created JSON client.
Now you can use synchronous TDLib methods through a JSON interface before creating a TDLib JSON client. Now you can use synchronous TDLib methods through a JSON interface before creating a TDLib JSON client.
* Added support for media streaming by allowing to download any part of a file: * Added support for media streaming by allowing to download any part of a file:
@ -1226,7 +1226,7 @@ Changes in 1.4.0 (1 May 2019):
* Removed the `on_closed` callback virtual method from low-level C++ ClientActor interface. * Removed the `on_closed` callback virtual method from low-level C++ ClientActor interface.
Callback destructor can be used instead. Callback destructor can be used instead.
* Updated dependencies in the prebuilt TDLib for Android: * Updated dependencies in the prebuilt TDLib for Android:
- Updated SDK to SDK 28 in which helper classes was moved from `android.support.` to `androidx.` package. - Updated SDK to SDK 28 in which helper classes were moved from `android.support.` to `androidx.` package.
- Updated NDK to r19c, which dropped support for Android versions up to 4.0.4, so the minimum supported version is - Updated NDK to r19c, which dropped support for Android versions up to 4.0.4, so the minimum supported version is
Android 4.1. Android 4.1.
- Updated OpenSSL to version 1.1.1. - Updated OpenSSL to version 1.1.1.
@ -1285,7 +1285,7 @@ Changes in 1.4.0 (1 May 2019):
Changes in 1.3.0 (5 Sep 2018): Changes in 1.3.0 (5 Sep 2018):
* Added a review of existing TDLib based [frameworks](https://github.com/tdlib/td/blob/master/example/README.md) * Added a review of existing TDLib based [frameworks](https://github.com/tdlight-team/tdlight/blob/master/example/README.md)
in different programming languages. in different programming languages.
* Added a [Getting started](https://core.telegram.org/tdlib/getting-started) guide describing the main TDLib concepts * Added a [Getting started](https://core.telegram.org/tdlib/getting-started) guide describing the main TDLib concepts
and basic principles required for library usage. and basic principles required for library usage.

View File

@ -45,7 +45,7 @@ set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment
# Determine the cmake host system version so we know where to find the iOS SDKs # Determine the cmake host system version so we know where to find the iOS SDKs
find_program (CMAKE_UNAME uname /bin /usr/bin /usr/local/bin) find_program (CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
if (CMAKE_UNAME) if (CMAKE_UNAME)
exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION) execute_process(COMMAND uname -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
endif (CMAKE_UNAME) endif (CMAKE_UNAME)
@ -163,7 +163,7 @@ set (IOS_DEPLOYMENT_TARGET ${IOS_DEPLOYMENT_TARGET} CACHE STRING "Minimum iOS ve
# Setup iOS developer location unless specified manually with CMAKE_IOS_DEVELOPER_ROOT # Setup iOS developer location unless specified manually with CMAKE_IOS_DEVELOPER_ROOT
# Note Xcode 4.3 changed the installation location, choose the most recent one available # Note Xcode 4.3 changed the installation location, choose the most recent one available
exec_program(/usr/bin/xcode-select ARGS -print-path OUTPUT_VARIABLE CMAKE_XCODE_DEVELOPER_DIR) execute_process(COMMAND /usr/bin/xcode-select -print-path OUTPUT_VARIABLE CMAKE_XCODE_DEVELOPER_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
set (XCODE_POST_43_ROOT "${CMAKE_XCODE_DEVELOPER_DIR}/Platforms/${IOS_PLATFORM_LOCATION}/Developer") set (XCODE_POST_43_ROOT "${CMAKE_XCODE_DEVELOPER_DIR}/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
set (XCODE_PRE_43_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer") set (XCODE_PRE_43_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT) if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)

View File

@ -6,7 +6,7 @@ if (POLICY CMP0065)
cmake_policy(SET CMP0065 NEW) cmake_policy(SET CMP0065 NEW)
endif() endif()
project(TDLib VERSION 1.8.21 LANGUAGES CXX C) project(TDLib VERSION 1.8.25 LANGUAGES CXX C)
if (NOT DEFINED CMAKE_MODULE_PATH) if (NOT DEFINED CMAKE_MODULE_PATH)
set(CMAKE_MODULE_PATH "") set(CMAKE_MODULE_PATH "")
@ -73,15 +73,15 @@ if (POLICY CMP0069)
endif() endif()
# Configure CCache if available # Configure CCache if available
find_program(CCACHE_FOUND ccache) #find_program(CCACHE_FOUND ccache)
#set(CCACHE_FOUND 0) #set(CCACHE_FOUND 0)
if (CCACHE_FOUND) #if (CCACHE_FOUND)
message(STATUS "Found ccache") # message(STATUS "Found ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) # set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) # set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
else() #else()
message(STATUS "Could NOT find ccache (this is NOT an error)") # message(STATUS "Could NOT find ccache (this is NOT an error)")
endif() #endif()
set(MEMPROF "" CACHE STRING "Use one of \"ON\", \"FAST\" or \"SAFE\" to enable memory profiling. \ set(MEMPROF "" CACHE STRING "Use one of \"ON\", \"FAST\" or \"SAFE\" to enable memory profiling. \
Works under macOS and Linux when compiled using glibc. \ Works under macOS and Linux when compiled using glibc. \
@ -207,9 +207,13 @@ add_subdirectory(sqlite)
add_subdirectory(tddb) add_subdirectory(tddb)
add_subdirectory(test) option(TD_SKIP_TEST "Use \"ON\" to skip building/running the test harness.")
if (NOT TD_SKIP_TEST)
add_subdirectory(test)
endif()
if (NOT CMAKE_CROSSCOMPILING) option(TD_SKIP_BENCHMARK "Use \"ON\" to skip building/running the benchmarks.")
if (NOT CMAKE_CROSSCOMPILING AND NOT TD_SKIP_BENCHMARK)
add_subdirectory(benchmark) add_subdirectory(benchmark)
endif() endif()
@ -302,12 +306,13 @@ set(TDLIB_SOURCE
td/telegram/BotInfoManager.cpp td/telegram/BotInfoManager.cpp
td/telegram/BotMenuButton.cpp td/telegram/BotMenuButton.cpp
td/telegram/CallActor.cpp td/telegram/CallActor.cpp
td/telegram/CallbackQueriesManager.cpp
td/telegram/CallDiscardReason.cpp td/telegram/CallDiscardReason.cpp
td/telegram/CallManager.cpp td/telegram/CallManager.cpp
td/telegram/CallbackQueriesManager.cpp
td/telegram/ChannelParticipantFilter.cpp td/telegram/ChannelParticipantFilter.cpp
td/telegram/ChatReactions.cpp td/telegram/ChatReactions.cpp
td/telegram/ClientActor.cpp td/telegram/ClientActor.cpp
td/telegram/CommonDialogManager.cpp
td/telegram/ConfigManager.cpp td/telegram/ConfigManager.cpp
td/telegram/ConnectionState.cpp td/telegram/ConnectionState.cpp
td/telegram/Contact.cpp td/telegram/Contact.cpp
@ -319,6 +324,7 @@ set(TDLIB_SOURCE
td/telegram/DhCache.cpp td/telegram/DhCache.cpp
td/telegram/DialogAction.cpp td/telegram/DialogAction.cpp
td/telegram/DialogActionBar.cpp td/telegram/DialogActionBar.cpp
td/telegram/DialogActionManager.cpp
td/telegram/DialogAdministrator.cpp td/telegram/DialogAdministrator.cpp
td/telegram/DialogDb.cpp td/telegram/DialogDb.cpp
td/telegram/DialogEventLog.cpp td/telegram/DialogEventLog.cpp
@ -327,10 +333,13 @@ set(TDLIB_SOURCE
td/telegram/DialogFilterManager.cpp td/telegram/DialogFilterManager.cpp
td/telegram/DialogId.cpp td/telegram/DialogId.cpp
td/telegram/DialogInviteLink.cpp td/telegram/DialogInviteLink.cpp
td/telegram/DialogInviteLinkManager.cpp
td/telegram/DialogLocation.cpp td/telegram/DialogLocation.cpp
td/telegram/DialogManager.cpp
td/telegram/DialogNotificationSettings.cpp td/telegram/DialogNotificationSettings.cpp
td/telegram/DialogParticipant.cpp td/telegram/DialogParticipant.cpp
td/telegram/DialogParticipantFilter.cpp td/telegram/DialogParticipantFilter.cpp
td/telegram/DialogParticipantManager.cpp
td/telegram/DialogSource.cpp td/telegram/DialogSource.cpp
td/telegram/Dimensions.cpp td/telegram/Dimensions.cpp
td/telegram/Document.cpp td/telegram/Document.cpp
@ -395,13 +404,16 @@ set(TDLIB_SOURCE
td/telegram/MessageDb.cpp td/telegram/MessageDb.cpp
td/telegram/MessageEntity.cpp td/telegram/MessageEntity.cpp
td/telegram/MessageExtendedMedia.cpp td/telegram/MessageExtendedMedia.cpp
td/telegram/MessageForwardInfo.cpp
td/telegram/MessageId.cpp td/telegram/MessageId.cpp
td/telegram/MessageImportManager.cpp
td/telegram/MessageInputReplyTo.cpp td/telegram/MessageInputReplyTo.cpp
td/telegram/MessageOrigin.cpp td/telegram/MessageOrigin.cpp
td/telegram/MessageReaction.cpp td/telegram/MessageReaction.cpp
td/telegram/MessageReplyHeader.cpp td/telegram/MessageReplyHeader.cpp
td/telegram/MessageReplyInfo.cpp td/telegram/MessageReplyInfo.cpp
td/telegram/MessageSearchFilter.cpp td/telegram/MessageSearchFilter.cpp
td/telegram/MessageSelfDestructType.cpp
td/telegram/MessageSender.cpp td/telegram/MessageSender.cpp
td/telegram/MessagesInfo.cpp td/telegram/MessagesInfo.cpp
td/telegram/MessagesManager.cpp td/telegram/MessagesManager.cpp
@ -423,34 +435,37 @@ set(TDLIB_SOURCE
td/telegram/net/NetQueryStats.cpp td/telegram/net/NetQueryStats.cpp
td/telegram/net/NetStatsManager.cpp td/telegram/net/NetStatsManager.cpp
td/telegram/net/Proxy.cpp td/telegram/net/Proxy.cpp
td/telegram/net/PublicRsaKeyShared.cpp td/telegram/net/PublicRsaKeySharedCdn.cpp
td/telegram/net/PublicRsaKeySharedMain.cpp
td/telegram/net/PublicRsaKeyWatchdog.cpp td/telegram/net/PublicRsaKeyWatchdog.cpp
td/telegram/net/Session.cpp td/telegram/net/Session.cpp
td/telegram/net/SessionProxy.cpp
td/telegram/net/SessionMultiProxy.cpp td/telegram/net/SessionMultiProxy.cpp
td/telegram/net/SessionProxy.cpp
td/telegram/NewPasswordState.cpp td/telegram/NewPasswordState.cpp
td/telegram/NotificationGroupInfo.cpp td/telegram/NotificationGroupInfo.cpp
td/telegram/NotificationGroupType.cpp td/telegram/NotificationGroupType.cpp
td/telegram/NotificationManager.cpp td/telegram/NotificationManager.cpp
td/telegram/NotificationSettingsScope.cpp
td/telegram/NotificationSettingsManager.cpp td/telegram/NotificationSettingsManager.cpp
td/telegram/NotificationSettingsScope.cpp
td/telegram/NotificationSound.cpp td/telegram/NotificationSound.cpp
td/telegram/NotificationType.cpp td/telegram/NotificationType.cpp
td/telegram/OptionManager.cpp td/telegram/OptionManager.cpp
td/telegram/OrderedMessage.cpp td/telegram/OrderedMessage.cpp
td/telegram/OrderInfo.cpp td/telegram/OrderInfo.cpp
td/telegram/Payments.cpp
td/telegram/PasswordManager.cpp td/telegram/PasswordManager.cpp
td/telegram/Payments.cpp
td/telegram/PeerColor.cpp
td/telegram/PhoneNumberManager.cpp td/telegram/PhoneNumberManager.cpp
td/telegram/PrivacyManager.cpp
td/telegram/Photo.cpp td/telegram/Photo.cpp
td/telegram/PhotoSize.cpp td/telegram/PhotoSize.cpp
td/telegram/PhotoSizeSource.cpp td/telegram/PhotoSizeSource.cpp
td/telegram/PollManager.cpp td/telegram/PollManager.cpp
td/telegram/Premium.cpp td/telegram/Premium.cpp
td/telegram/PremiumGiftOption.cpp td/telegram/PremiumGiftOption.cpp
td/telegram/PrivacyManager.cpp
td/telegram/QueryCombiner.cpp td/telegram/QueryCombiner.cpp
td/telegram/QueryMerger.cpp td/telegram/QueryMerger.cpp
td/telegram/ReactionListType.cpp
td/telegram/ReactionManager.cpp td/telegram/ReactionManager.cpp
td/telegram/ReactionType.cpp td/telegram/ReactionType.cpp
td/telegram/RecentDialogList.cpp td/telegram/RecentDialogList.cpp
@ -459,6 +474,8 @@ set(TDLIB_SOURCE
td/telegram/ReportReason.cpp td/telegram/ReportReason.cpp
td/telegram/RequestedDialogType.cpp td/telegram/RequestedDialogType.cpp
td/telegram/RestrictionReason.cpp td/telegram/RestrictionReason.cpp
td/telegram/SavedMessagesManager.cpp
td/telegram/SavedMessagesTopicId.cpp
td/telegram/ScopeNotificationSettings.cpp td/telegram/ScopeNotificationSettings.cpp
td/telegram/SecretChatActor.cpp td/telegram/SecretChatActor.cpp
td/telegram/SecretChatDb.cpp td/telegram/SecretChatDb.cpp
@ -482,9 +499,11 @@ set(TDLIB_SOURCE
td/telegram/StickersManager.cpp td/telegram/StickersManager.cpp
td/telegram/StickerType.cpp td/telegram/StickerType.cpp
td/telegram/StorageManager.cpp td/telegram/StorageManager.cpp
td/telegram/MemoryManager.cpp
td/telegram/StoryContent.cpp td/telegram/StoryContent.cpp
td/telegram/StoryContentType.cpp td/telegram/StoryContentType.cpp
td/telegram/StoryDb.cpp td/telegram/StoryDb.cpp
td/telegram/StoryForwardInfo.cpp
td/telegram/StoryInteractionInfo.cpp td/telegram/StoryInteractionInfo.cpp
td/telegram/StoryManager.cpp td/telegram/StoryManager.cpp
td/telegram/StoryStealthMode.cpp td/telegram/StoryStealthMode.cpp
@ -498,6 +517,7 @@ set(TDLIB_SOURCE
td/telegram/TopDialogCategory.cpp td/telegram/TopDialogCategory.cpp
td/telegram/TopDialogManager.cpp td/telegram/TopDialogManager.cpp
td/telegram/TranscriptionInfo.cpp td/telegram/TranscriptionInfo.cpp
td/telegram/TranscriptionManager.cpp
td/telegram/TranslationManager.cpp td/telegram/TranslationManager.cpp
td/telegram/UpdatesManager.cpp td/telegram/UpdatesManager.cpp
td/telegram/Usernames.cpp td/telegram/Usernames.cpp
@ -574,6 +594,7 @@ set(TDLIB_SOURCE
td/telegram/ChatId.h td/telegram/ChatId.h
td/telegram/ChatReactions.h td/telegram/ChatReactions.h
td/telegram/ClientActor.h td/telegram/ClientActor.h
td/telegram/CommonDialogManager.h
td/telegram/ConfigManager.h td/telegram/ConfigManager.h
td/telegram/ConnectionState.h td/telegram/ConnectionState.h
td/telegram/Contact.h td/telegram/Contact.h
@ -587,6 +608,7 @@ set(TDLIB_SOURCE
td/telegram/DhConfig.h td/telegram/DhConfig.h
td/telegram/DialogAction.h td/telegram/DialogAction.h
td/telegram/DialogActionBar.h td/telegram/DialogActionBar.h
td/telegram/DialogActionManager.h
td/telegram/DialogAdministrator.h td/telegram/DialogAdministrator.h
td/telegram/DialogBoostLinkInfo.h td/telegram/DialogBoostLinkInfo.h
td/telegram/DialogDate.h td/telegram/DialogDate.h
@ -597,13 +619,16 @@ set(TDLIB_SOURCE
td/telegram/DialogFilterId.h td/telegram/DialogFilterId.h
td/telegram/DialogFilterInviteLink.h td/telegram/DialogFilterInviteLink.h
td/telegram/DialogFilterManager.h td/telegram/DialogFilterManager.h
td/telegram/DialogInviteLinkManager.h
td/telegram/DialogId.h td/telegram/DialogId.h
td/telegram/DialogInviteLink.h td/telegram/DialogInviteLink.h
td/telegram/DialogListId.h td/telegram/DialogListId.h
td/telegram/DialogLocation.h td/telegram/DialogLocation.h
td/telegram/DialogManager.h
td/telegram/DialogNotificationSettings.h td/telegram/DialogNotificationSettings.h
td/telegram/DialogParticipant.h td/telegram/DialogParticipant.h
td/telegram/DialogParticipantFilter.h td/telegram/DialogParticipantFilter.h
td/telegram/DialogParticipantManager.h
td/telegram/DialogSource.h td/telegram/DialogSource.h
td/telegram/Dimensions.h td/telegram/Dimensions.h
td/telegram/Document.h td/telegram/Document.h
@ -683,8 +708,10 @@ set(TDLIB_SOURCE
td/telegram/MessageDb.h td/telegram/MessageDb.h
td/telegram/MessageEntity.h td/telegram/MessageEntity.h
td/telegram/MessageExtendedMedia.h td/telegram/MessageExtendedMedia.h
td/telegram/MessageForwardInfo.h
td/telegram/MessageFullId.h td/telegram/MessageFullId.h
td/telegram/MessageId.h td/telegram/MessageId.h
td/telegram/MessageImportManager.h
td/telegram/MessageInputReplyTo.h td/telegram/MessageInputReplyTo.h
td/telegram/MessageLinkInfo.h td/telegram/MessageLinkInfo.h
td/telegram/MessageOrigin.h td/telegram/MessageOrigin.h
@ -692,6 +719,7 @@ set(TDLIB_SOURCE
td/telegram/MessageReplyHeader.h td/telegram/MessageReplyHeader.h
td/telegram/MessageReplyInfo.h td/telegram/MessageReplyInfo.h
td/telegram/MessageSearchFilter.h td/telegram/MessageSearchFilter.h
td/telegram/MessageSelfDestructType.h
td/telegram/MessageSender.h td/telegram/MessageSender.h
td/telegram/MessagesInfo.h td/telegram/MessagesInfo.h
td/telegram/MessagesManager.h td/telegram/MessagesManager.h
@ -720,7 +748,8 @@ set(TDLIB_SOURCE
td/telegram/net/NetStatsManager.h td/telegram/net/NetStatsManager.h
td/telegram/net/NetType.h td/telegram/net/NetType.h
td/telegram/net/Proxy.h td/telegram/net/Proxy.h
td/telegram/net/PublicRsaKeyShared.h td/telegram/net/PublicRsaKeySharedCdn.h
td/telegram/net/PublicRsaKeySharedMain.h
td/telegram/net/PublicRsaKeyWatchdog.h td/telegram/net/PublicRsaKeyWatchdog.h
td/telegram/net/Session.h td/telegram/net/Session.h
td/telegram/net/SessionProxy.h td/telegram/net/SessionProxy.h
@ -747,6 +776,7 @@ set(TDLIB_SOURCE
td/telegram/OrderInfo.h td/telegram/OrderInfo.h
td/telegram/PasswordManager.h td/telegram/PasswordManager.h
td/telegram/Payments.h td/telegram/Payments.h
td/telegram/PeerColor.h
td/telegram/PhoneNumberManager.h td/telegram/PhoneNumberManager.h
td/telegram/Photo.h td/telegram/Photo.h
td/telegram/PhotoFormat.h td/telegram/PhotoFormat.h
@ -761,8 +791,10 @@ set(TDLIB_SOURCE
td/telegram/PublicDialogType.h td/telegram/PublicDialogType.h
td/telegram/QueryCombiner.h td/telegram/QueryCombiner.h
td/telegram/QueryMerger.h td/telegram/QueryMerger.h
td/telegram/ReactionListType.h
td/telegram/ReactionManager.h td/telegram/ReactionManager.h
td/telegram/ReactionType.h td/telegram/ReactionType.h
td/telegram/ReactionUnavailabilityReason.h
td/telegram/RecentDialogList.h td/telegram/RecentDialogList.h
td/telegram/RepliedMessageInfo.h td/telegram/RepliedMessageInfo.h
td/telegram/ReplyMarkup.h td/telegram/ReplyMarkup.h
@ -770,6 +802,8 @@ set(TDLIB_SOURCE
td/telegram/RequestActor.h td/telegram/RequestActor.h
td/telegram/RequestedDialogType.h td/telegram/RequestedDialogType.h
td/telegram/RestrictionReason.h td/telegram/RestrictionReason.h
td/telegram/SavedMessagesManager.h
td/telegram/SavedMessagesTopicId.h
td/telegram/ScheduledServerMessageId.h td/telegram/ScheduledServerMessageId.h
td/telegram/ScopeNotificationSettings.h td/telegram/ScopeNotificationSettings.h
td/telegram/SecretChatActor.h td/telegram/SecretChatActor.h
@ -798,11 +832,13 @@ set(TDLIB_SOURCE
td/telegram/StickersManager.h td/telegram/StickersManager.h
td/telegram/StickerType.h td/telegram/StickerType.h
td/telegram/StorageManager.h td/telegram/StorageManager.h
td/telegram/MemoryManager.h
td/telegram/StoryContent.h td/telegram/StoryContent.h
td/telegram/StoryContentType.h td/telegram/StoryContentType.h
td/telegram/StoryDb.h td/telegram/StoryDb.h
td/telegram/StoryFullId.h td/telegram/StoryFullId.h
td/telegram/StoryId.h td/telegram/StoryId.h
td/telegram/StoryForwardInfo.h
td/telegram/StoryInteractionInfo.h td/telegram/StoryInteractionInfo.h
td/telegram/StoryListId.h td/telegram/StoryListId.h
td/telegram/StoryManager.h td/telegram/StoryManager.h
@ -819,6 +855,7 @@ set(TDLIB_SOURCE
td/telegram/TopDialogCategory.h td/telegram/TopDialogCategory.h
td/telegram/TopDialogManager.h td/telegram/TopDialogManager.h
td/telegram/TranscriptionInfo.h td/telegram/TranscriptionInfo.h
td/telegram/TranscriptionManager.h
td/telegram/TranslationManager.h td/telegram/TranslationManager.h
td/telegram/UniqueId.h td/telegram/UniqueId.h
td/telegram/UpdatesManager.h td/telegram/UpdatesManager.h
@ -867,6 +904,7 @@ set(TDLIB_SOURCE
td/telegram/MediaAreaCoordinates.hpp td/telegram/MediaAreaCoordinates.hpp
td/telegram/MessageEntity.hpp td/telegram/MessageEntity.hpp
td/telegram/MessageExtendedMedia.hpp td/telegram/MessageExtendedMedia.hpp
td/telegram/MessageForwardInfo.hpp
td/telegram/MessageInputReplyTo.hpp td/telegram/MessageInputReplyTo.hpp
td/telegram/MessageOrigin.hpp td/telegram/MessageOrigin.hpp
td/telegram/MessageReaction.hpp td/telegram/MessageReaction.hpp
@ -891,6 +929,7 @@ set(TDLIB_SOURCE
td/telegram/StickerMaskPosition.hpp td/telegram/StickerMaskPosition.hpp
td/telegram/StickerPhotoSize.hpp td/telegram/StickerPhotoSize.hpp
td/telegram/StickersManager.hpp td/telegram/StickersManager.hpp
td/telegram/StoryForwardInfo.hpp
td/telegram/StoryInteractionInfo.hpp td/telegram/StoryInteractionInfo.hpp
td/telegram/StoryStealthMode.hpp td/telegram/StoryStealthMode.hpp
td/telegram/TranscriptionInfo.hpp td/telegram/TranscriptionInfo.hpp
@ -1060,6 +1099,8 @@ endif()
#EXECUTABLES #EXECUTABLES
if (NOT CMAKE_CROSSCOMPILING) if (NOT CMAKE_CROSSCOMPILING)
option(TD_SKIP_TG_CLI "Use \"ON\" to skip building tg_cli.")
if (NOT CMAKE_CROSSCOMPILING AND NOT TD_SKIP_TG_CLI)
add_executable(tg_cli td/telegram/cli.cpp ${TL_TD_JSON_SOURCE}) add_executable(tg_cli td/telegram/cli.cpp ${TL_TD_JSON_SOURCE})
if (NOT READLINE_FOUND) if (NOT READLINE_FOUND)
@ -1088,6 +1129,7 @@ if (NOT CMAKE_CROSSCOMPILING)
target_link_libraries(tg_cli PRIVATE memprof tdclient tdcore) target_link_libraries(tg_cli PRIVATE memprof tdclient tdcore)
add_dependencies(tg_cli tl_generate_json) add_dependencies(tg_cli tl_generate_json)
endif() endif()
endif()
#Exported libraries #Exported libraries
add_library(TdStatic INTERFACE) add_library(TdStatic INTERFACE)

View File

@ -1,9 +1,12 @@
# TDLib # TDLight
TDLib (Telegram Database library) is a cross-platform library for building [Telegram](https://telegram.org) clients. It can be easily used from almost any programming language. TDLight is a fork of TDLib, a cross-platform library for building [Telegram](https://telegram.org) clients. It can be easily used from almost any programming language.
## Table of Contents ## Table of Contents
- [Features](#features) - [Features](#features)
- [TDLight extra features](#tdlight-extra-features)
- [TDLight extra API functions](#tdlight-extra-api-functions)
- [TDLight recommended options](#tdlight-recommended-options)
- [Examples and documentation](#usage) - [Examples and documentation](#usage)
- [Dependencies](#dependencies) - [Dependencies](#dependencies)
- [Building](#building) - [Building](#building)
@ -28,17 +31,42 @@ TDLib (Telegram Database library) is a cross-platform library for building [Tele
* **Secure**: all local data is encrypted using a user-provided encryption key. * **Secure**: all local data is encrypted using a user-provided encryption key.
* **Fully-asynchronous**: requests to `TDLib` don't block each other or anything else, responses are sent when they are available. * **Fully-asynchronous**: requests to `TDLib` don't block each other or anything else, responses are sent when they are available.
<a name="tdlight-extra-features"></a>
### TDLight extra features
#### TDLight extra options
* **disable_minithumbnails** (true/**false**) This setting removes minithumbnails everywhere. It reduces memory usage because tdlib keeps them in RAM
* **disable_document_filenames** (true/**false**) If you don't care about having the original filenames of every file stored in RAM, you can disable them using this option. It reduces memory usage
* **disable_notifications** (true/**false**) In TDLib pending notification updates are stored in ram until you "read" them. This option disables completely notifications and keeps the pending notifications queue empty, reducing memory usage
* **ignore_update_chat_last_message** (true/**false**) If you don't care about have updateChatLastMessage updates enable this
* **ignore_update_chat_read_inbox** (true/**false**) If you don't care about have updateChatReadInbox updates enable this
* **ignore_update_user_chat_action** (true/**false**) If you don't care about have updateUserChatAction updates enable this
* **ignore_server_deletes_and_reads** (true/**false**) If you don't care about receiving read receipts and remote deletes from other users, enable this, it will reduce memory usage
* **receive_access_hashes** (true/**false**) Receive chats and users access hash as updates
* **disable_auto_download** (true/**false**) Forcefully ignore auto download settings of all sessions
<a name="tdlight-extra-api-functions"></a>
### TDLight extra API functions
#### TdApi.GetMemoryStatistics
This method is used to read the size of all the internal TDLib data structures.
The output contains a string that can be parsed as a JSON.
<a name="tdlight-recommended-options"></a>
## TDLight recommended options
* Options:
* ignore_inline_thumbnails: true
* disable_top_chats: true
* ignore_platform_restrictions: true
* ignore_sensitive_content_restrictions: true
* Disable all the databases (messages_db, users_db, files_db)
<a name="usage"></a> <a name="usage"></a>
## Examples and documentation ## Examples and documentation
See our [Getting Started](https://core.telegram.org/tdlib/getting-started) tutorial for a description of basic TDLib concepts. See our [Getting Started](https://core.telegram.org/tdlib/getting-started) tutorial for a description of basic TDLib concepts.
Take a look at our [examples](https://github.com/tdlib/td/blob/master/example/README.md#tdlib-usage-and-build-examples). Take a look at our [examples](https://github.com/tdlight-team/tdlight/blob/master/example/README.md#tdlib-usage-and-build-examples).
See a [TDLib build instructions generator](https://tdlib.github.io/td/build.html) for detailed instructions on how to build TDLib. See a [TDLight build instructions generator](https://tdlight-team.github.io/tdlight/build.html) for detailed instructions on how to build TDLib.
See description of our [JSON](#using-json), [C++](#using-cxx), [Java](#using-java) and [.NET](#using-dotnet) interfaces. See description of our [JSON](#using-json), [C++](#using-cxx), [Java](#using-java) and [.NET](#using-dotnet) interfaces.
See the [td_api.tl](https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl) scheme or the automatically generated [HTML documentation](https://core.telegram.org/tdlib/docs/td__api_8h.html) See the [td_api.tl](https://github.com/tdlight-team/tdlight/blob/master/td/generate/scheme/td_api.tl) scheme or the automatically generated [HTML documentation](https://core.telegram.org/tdlib/docs/td__api_8h.html)
for a list of all available `TDLib` [methods](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html) and [classes](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html). for a list of all available `TDLib` [methods](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html) and [classes](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html).
<a name="dependencies"></a> <a name="dependencies"></a>
@ -55,7 +83,7 @@ for a list of all available `TDLib` [methods](https://core.telegram.org/tdlib/do
<a name="building"></a> <a name="building"></a>
## Building ## Building
The simplest way to build `TDLib` is to use our [TDLib build instructions generator](https://tdlib.github.io/td/build.html). The simplest way to build `TDLight` is to use our [TDLight build instructions generator](https://tdlight-team.github.io/tdlight/build.html).
You need only to choose your programming language and target operating system to receive complete build instructions. You need only to choose your programming language and target operating system to receive complete build instructions.
In general, you need to install all `TDLib` [dependencies](#dependencies), enter directory containing `TDLib` sources and compile them using CMake: In general, you need to install all `TDLib` [dependencies](#dependencies), enter directory containing `TDLib` sources and compile them using CMake:
@ -67,7 +95,7 @@ cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . cmake --build .
``` ```
To build `TDLib` on low memory devices you can run [SplitSource.php](https://github.com/tdlib/td/blob/master/SplitSource.php) script To build `TDLib` on low memory devices you can run [SplitSource.php](https://github.com/tdlight-team/tdlight/blob/master/SplitSource.php) script
before compiling main `TDLib` source code and compile only needed targets: before compiling main `TDLib` source code and compile only needed targets:
``` ```
mkdir build mkdir build
@ -103,24 +131,24 @@ target_link_libraries(YourTarget PRIVATE Td::TdStatic)
Or you could install `TDLib` and then reference it in your CMakeLists.txt like this: Or you could install `TDLib` and then reference it in your CMakeLists.txt like this:
``` ```
find_package(Td 1.8.21 REQUIRED) find_package(Td 1.8.25 REQUIRED)
target_link_libraries(YourTarget PRIVATE Td::TdStatic) target_link_libraries(YourTarget PRIVATE Td::TdStatic)
``` ```
See [example/cpp/CMakeLists.txt](https://github.com/tdlib/td/blob/master/example/cpp/CMakeLists.txt). See [example/cpp/CMakeLists.txt](https://github.com/tdlight-team/tdlight/blob/master/example/cpp/CMakeLists.txt).
<a name="using-java"></a> <a name="using-java"></a>
## Using in Java projects ## Using in Java projects
`TDLib` provides native Java interface through JNI. To enable it, specify option `-DTD_ENABLE_JNI=ON` to CMake. `TDLib` provides native Java interface through JNI. To enable it, specify option `-DTD_ENABLE_JNI=ON` to CMake.
See [example/java](https://github.com/tdlib/td/tree/master/example/java) for example of using `TDLib` from Java and detailed build and usage instructions. See [example/java](https://github.com/tdlight-team/tdlight/tree/master/example/java) for example of using `TDLib` from Java and detailed build and usage instructions.
<a name="using-dotnet"></a> <a name="using-dotnet"></a>
## Using in .NET projects ## Using in .NET projects
`TDLib` provides native .NET interface through `C++/CLI` and `C++/CX`. To enable it, specify option `-DTD_ENABLE_DOTNET=ON` to CMake. `TDLib` provides native .NET interface through `C++/CLI` and `C++/CX`. To enable it, specify option `-DTD_ENABLE_DOTNET=ON` to CMake.
.NET Core supports `C++/CLI` only since version 3.1 and only on Windows, so if older .NET Core is used or portability is needed, then `TDLib` JSON interface should be used through P/Invoke instead. .NET Core supports `C++/CLI` only since version 3.1 and only on Windows, so if older .NET Core is used or portability is needed, then `TDLib` JSON interface should be used through P/Invoke instead.
See [example/csharp](https://github.com/tdlib/td/tree/master/example/csharp) for example of using `TDLib` from C# and detailed build and usage instructions. See [example/csharp](https://github.com/tdlight-team/tdlight/tree/master/example/csharp) for example of using `TDLib` from C# and detailed build and usage instructions.
See [example/uwp](https://github.com/tdlib/td/tree/master/example/uwp) for example of using `TDLib` from C# UWP application and detailed build and usage instructions for Visual Studio Extension "TDLib for Universal Windows Platform". See [example/uwp](https://github.com/tdlight-team/tdlight/tree/master/example/uwp) for example of using `TDLib` from C# UWP application and detailed build and usage instructions for Visual Studio Extension "TDLib for Universal Windows Platform".
When `TDLib` is built with `TD_ENABLE_DOTNET` option enabled, `C++` documentation is removed from some files. You need to checkout these files to return `C++` documentation back: When `TDLib` is built with `TD_ENABLE_DOTNET` option enabled, `C++` documentation is removed from some files. You need to checkout these files to return `C++` documentation back:
``` ```
@ -132,13 +160,13 @@ git checkout td/telegram/Client.h td/telegram/Log.h td/tl/TlObject.h
`TDLib` provides efficient native C++, Java, and .NET interfaces. `TDLib` provides efficient native C++, Java, and .NET interfaces.
But for most use cases we suggest to use the JSON interface, which can be easily used with any programming language that is able to execute C functions. But for most use cases we suggest to use the JSON interface, which can be easily used with any programming language that is able to execute C functions.
See [td_json_client](https://core.telegram.org/tdlib/docs/td__json__client_8h.html) documentation for detailed JSON interface description, See [td_json_client](https://core.telegram.org/tdlib/docs/td__json__client_8h.html) documentation for detailed JSON interface description,
the [td_api.tl](https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl) scheme or the automatically generated [HTML documentation](https://core.telegram.org/tdlib/docs/td__api_8h.html) for a list of the [td_api.tl](https://github.com/tdlight-team/tdlight/blob/master/td/generate/scheme/td_api.tl) scheme or the automatically generated [HTML documentation](https://core.telegram.org/tdlib/docs/td__api_8h.html) for a list of
all available `TDLib` [methods](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html) and [classes](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html). all available `TDLib` [methods](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html) and [classes](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html).
`TDLib` JSON interface adheres to semantic versioning and versions with the same major version number are binary and backward compatible, but the underlying `TDLib` API can be different for different minor and even patch versions. `TDLib` JSON interface adheres to semantic versioning and versions with the same major version number are binary and backward compatible, but the underlying `TDLib` API can be different for different minor and even patch versions.
If you need to support different `TDLib` versions, then you can use a value of the `version` option to find exact `TDLib` version to use appropriate API methods. If you need to support different `TDLib` versions, then you can use a value of the `version` option to find exact `TDLib` version to use appropriate API methods.
See [example/python/tdjson_example.py](https://github.com/tdlib/td/blob/master/example/python/tdjson_example.py) for an example of such usage. See [example/python/tdjson_example.py](https://github.com/tdlight-team/tdlight/tree/master/example/python/tdjson_example.py) for an example of such usage.
<a name="license"></a> <a name="license"></a>
## License ## License

View File

@ -170,7 +170,7 @@ function split_file($file, $chunks, $undo) {
'(CREATE_REQUEST|CREATE_NO_ARGS_REQUEST)[(](?<name>[A-Z][A-Za-z]*)|'. '(CREATE_REQUEST|CREATE_NO_ARGS_REQUEST)[(](?<name>[A-Z][A-Za-z]*)|'.
'(?<name>complete_pending_preauthentication_requests)|'. '(?<name>complete_pending_preauthentication_requests)|'.
'(?<name>get_message_history_slice)|'. '(?<name>get_message_history_slice)|'.
'(Up|Down)load[a-zA-Z]*C(?<name>allback)|(up|down)load_[a-z_]*_c(?<name>allback)_|'. '(Up|Down)load(?!ManagerCallback)[a-zA-Z]+C(?<name>allback)|(up|down)load_[a-z_]*_c(?<name>allback)_|'.
'(?<name>lazy_to_json)|'. '(?<name>lazy_to_json)|'.
'(?<name>LogEvent)[^sA]|'. '(?<name>LogEvent)[^sA]|'.
'(?<name>parse)[(]|'. '(?<name>parse)[(]|'.
@ -231,27 +231,46 @@ function split_file($file, $chunks, $undo) {
'std::int32_t' => '', 'std::int32_t' => '',
'std::int64_t' => '', 'std::int64_t' => '',
'td::unique' => 'algorithm', 'td::unique' => 'algorithm',
'std::count_if' => 'algorithm',
'std::fill' => 'algorithm', 'std::fill' => 'algorithm',
'std::find' => 'algorithm', 'std::find' => 'algorithm',
'std::is_sorted' => 'algorithm',
'std::lower_bound' => 'algorithm',
'std::max' => 'algorithm', 'std::max' => 'algorithm',
'std::merge' => 'algorithm',
'std::min' => 'algorithm', 'std::min' => 'algorithm',
'std::partial_sort' => 'algorithm',
'std::partition' => 'algorithm',
'std::remove' => 'algorithm', 'std::remove' => 'algorithm',
'std::reverse' => 'algorithm', 'std::reverse' => 'algorithm',
'std::rotate' => 'algorithm', 'std::rotate' => 'algorithm',
'std::sort' => 'algorithm', 'std::sort' => 'algorithm',
'std::stable_sort' => 'algorithm',
'std::upper_bound' => 'algorithm',
'std::abs' => 'cmath', 'std::abs' => 'cmath',
'std::isfinite' => 'cmath',
'std::function' => 'functional',
'std::greater' => 'functional',
'std::reference_wrapper' => 'functional',
'std::make_move_iterator' => 'iterator',
'std::numeric_limits' => 'limits', 'std::numeric_limits' => 'limits',
'std::map' => 'map',
'std::multimap' => 'map',
'std::make_shared' => 'memory', 'std::make_shared' => 'memory',
'std::shared_ptr' => 'memory', 'std::shared_ptr' => 'memory',
'std::multiset' => 'set',
'std::set' => 'set',
'std::get' => 'tuple',
'std::make_tuple' => 'tuple',
'std::tie' => 'tuple', 'std::tie' => 'tuple',
'std::tuple' => 'tuple', 'std::tuple' => 'tuple',
'std::decay_t' => 'type_traits', 'std::decay_t' => 'type_traits',
'std::is_same' => 'type_traits', 'std::is_same' => 'type_traits',
'std::unordered_map' => 'unordered_map',
'std::unordered_set' => 'unordered_set',
'std::make_pair' => 'utility', 'std::make_pair' => 'utility',
'std::pair' => 'utility', 'std::pair' => 'utility',
'std::swap' => 'utility', 'std::swap' => 'utility');
'std::unordered_map' => 'unordered_map',
'std::unordered_set' => 'unordered_set');
foreach ($type_headers as $type => $header) { foreach ($type_headers as $type => $header) {
if (in_array($type, $std_methods)) { if (in_array($type, $std_methods)) {
$std_methods = array_diff($std_methods, array($type)); $std_methods = array_diff($std_methods, array($type));
@ -276,55 +295,118 @@ function split_file($file, $chunks, $undo) {
if (!preg_match('/Td::~?Td/', $new_content)) { // destructor Td::~Td needs to see definitions of all forward-declared classes if (!preg_match('/Td::~?Td/', $new_content)) { // destructor Td::~Td needs to see definitions of all forward-declared classes
$td_methods = array( $td_methods = array(
'account_manager[_(-][^.]|AccountManager[^;>]' => "AccountManager", 'AccentColorId' => 'AccentColorId',
'animations_manager[_(-][^.]|AnimationsManager[^;>]' => "AnimationsManager", 'account_manager[_(-](?![.]get[(][)])|AccountManager[^;>]' => 'AccountManager',
'attach_menu_manager[_(-][^.]|AttachMenuManager[^;>]' => "AttachMenuManager", 'animations_manager[_(-](?![.]get[(][)])|AnimationsManager[^;>]' => 'AnimationsManager',
'audios_manager[_(-][^.]|AudiosManager' => "AudiosManager", 'attach_menu_manager[_(-](?![.]get[(][)])|AttachMenuManager[^;>]' => 'AttachMenuManager',
'auth_manager[_(-][^.]|AuthManager' => 'AuthManager', 'audios_manager[_(-](?![.]get[(][)])|AudiosManager' => 'AudiosManager',
'autosave_manager[_(-][^.]|AutosaveManager' => 'AutosaveManager', 'auth_manager[_(-](?![.]get[(][)])|AuthManager' => 'AuthManager',
'background_manager[_(-][^.]|BackgroundManager' => "BackgroundManager", 'AutoDownloadSettings|[a-z_]*auto_download_settings' => 'AutoDownloadSettings',
'boost_manager[_(-][^.]|BoostManager' => "BoostManager", 'autosave_manager[_(-](?![.]get[(][)])|AutosaveManager' => 'AutosaveManager',
'bot_info_manager[_(-][^.]|BotInfoManager' => "BotInfoManager", 'BackgroundId' => 'BackgroundId',
'contacts_manager[_(-][^.]|ContactsManager([^ ;.]| [^*])' => 'ContactsManager', 'background_manager[_(-](?![.]get[(][)])|BackgroundManager' => 'BackgroundManager',
'country_info_manager[_(-][^.]|CountryInfoManager' => 'CountryInfoManager', 'BackgroundType' => 'BackgroundType',
'dialog_filter_manager[_(-][^.]|DialogFilterManager' => "DialogFilterManager", 'BotMenuButton|[a-z_]*_menu_button' => 'BotMenuButton',
'documents_manager[_(-][^.]|DocumentsManager' => "DocumentsManager", 'boost_manager[_(-](?![.]get[(][)])|BoostManager' => 'BoostManager',
'download_manager[_(-][^.]|DownloadManager' => "DownloadManager", 'bot_info_manager[_(-](?![.]get[(][)])|BotInfoManager' => 'BotInfoManager',
'file_reference_manager[_(-][^.]|FileReferenceManager|file_references[)]' => 'FileReferenceManager', 'callback_queries_manager[_(-](?![.]get[(][)])|CallbackQueriesManager' => 'CallbackQueriesManager',
'file_manager[_(-][^.]|FileManager([^ ;.]| [^*])|update_file[)]' => 'files/FileManager', 'CallId' => 'CallId',
'forum_topic_manager[_(-][^.]|ForumTopicManager' => 'ForumTopicManager', 'call_manager[_(-](?![.]get[(][)])|CallManager' => 'CallManager',
'ChannelId' => 'ChannelId',
'ChatId' => 'ChatId',
'common_dialog_manager[_(-](?![.]get[(][)])|CommonDialogManager' => 'CommonDialogManager',
'contacts_manager[_(-](?![.]get[(][)])|ContactsManager([^ ;.]| [^*])' => 'ContactsManager',
'country_info_manager[_(-](?![.]get[(][)])|CountryInfoManager' => 'CountryInfoManager',
'CustomEmojiId' => 'CustomEmojiId',
'device_token_manager[_(-](?![.]get[(][)])|DeviceTokenManager' => 'DeviceTokenManager',
'DialogAction[^M]' => 'DialogAction',
'dialog_action_manager[_(-](?![.]get[(][)])|DialogActionManager' => 'DialogActionManager',
'DialogFilter[^A-Z]' => 'DialogFilter',
'DialogFilterId' => 'DialogFilterId',
'dialog_filter_manager[_(-](?![.]get[(][)])|DialogFilterManager' => 'DialogFilterManager',
'DialogId' => 'DialogId',
'dialog_invite_link_manager[_(-](?![.]get[(][)])|DialogInviteLinkManager' => 'DialogInviteLinkManager',
'DialogListId' => 'DialogListId',
'DialogLocation' => 'DialogLocation',
'dialog_manager[_(-](?![.]get[(][)])|DialogManager' => 'DialogManager',
'DialogParticipantFilter' => 'DialogParticipantFilter',
'dialog_participant_manager[_(-](?![.]get[(][)])|DialogParticipantManager' => 'DialogParticipantManager',
'DialogSource' => 'DialogSource',
'documents_manager[_(-](?![.]get[(][)])|DocumentsManager' => 'DocumentsManager',
'download_manager[_(-](?![.]get[(][)])|DownloadManager[^C]' => 'DownloadManager',
'DownloadManagerCallback' => 'DownloadManagerCallback',
'EmailVerification' => 'EmailVerification',
'EmojiGroup' => 'EmojiGroup',
'EmojiStatus|[a-z_]*_emoji_status' => 'EmojiStatus',
'file_reference_manager[_(-](?![.]get[(][)])|FileReferenceManager|file_references[)]' => 'FileReferenceManager',
'file_manager[_(-](?![.]get[(][)])|FileManager([^ ;.]| [^*])|update_file[)]' => 'files/FileManager',
'FolderId' => 'FolderId',
'forum_topic_manager[_(-](?![.]get[(][)])|ForumTopicManager' => 'ForumTopicManager',
'game_manager[_(-](?![.]get[(][)])|GameManager' => 'GameManager',
'G[(][)]|Global[^A-Za-z]' => 'Global', 'G[(][)]|Global[^A-Za-z]' => 'Global',
'game_manager[_(-][^.]|GameManager' => 'GameManager', 'GlobalPrivacySettings' => 'GlobalPrivacySettings',
'group_call_manager[_(-][^.]|GroupCallManager' => 'GroupCallManager', 'GroupCallId' => 'GroupCallId',
'HashtagHints' => 'HashtagHints', 'group_call_manager[_(-](?![.]get[(][)])|GroupCallManager' => 'GroupCallManager',
'inline_queries_manager[_(-][^.]|InlineQueriesManager' => 'InlineQueriesManager', 'hashtag_hints[_(-](?![.]get[(][)])|HashtagHints' => 'HashtagHints',
'inline_queries_manager[_(-](?![.]get[(][)])|InlineQueriesManager' => 'InlineQueriesManager',
'language_pack_manager[_(-]|LanguagePackManager' => 'LanguagePackManager', 'language_pack_manager[_(-]|LanguagePackManager' => 'LanguagePackManager',
'link_manager[_(-][^.]|LinkManager' => 'LinkManager', 'link_manager[_(-](?![.]get[(][)])|LinkManager' => 'LinkManager',
'LogeventIdWithGeneration|add_log_event|delete_log_event|get_erase_log_event_promise|parse_time|store_time' => 'logevent/LogEventHelper', 'LogeventIdWithGeneration|add_log_event|delete_log_event|get_erase_log_event_promise|parse_time|store_time' => 'logevent/LogEventHelper',
'MessageCopyOptions' => 'MessageCopyOptions', 'MessageCopyOptions' => 'MessageCopyOptions',
'messages_manager[_(-][^.]|MessagesManager' => 'MessagesManager', 'MessageForwardInfo|LastForwardedMessageInfo|forward_info' => 'MessageForwardInfo',
'notification_manager[_(-][^.]|NotificationManager|notifications[)]' => 'NotificationManager', 'MessageFullId' => 'MessageFullId',
'notification_settings_manager[_(-][^.]|NotificationSettingsManager' => 'NotificationSettingsManager', 'MessageId' => 'MessageId',
'option_manager[_(-][^.]|OptionManager' => "OptionManager", 'message_import_manager[_(-](?![.]get[(][)])|MessageImportManager' => 'MessageImportManager',
'phone_number_manager[_(-][^.]|PhoneNumberManager' => "PhoneNumberManager", 'MessageLinkInfo' => 'MessageLinkInfo',
'poll_manager[_(-][^.]|PollManager' => "PollManager", 'MessageReaction|UnreadMessageReaction|[a-z_]*message[a-z_]*reaction' => 'MessageReaction',
'privacy_manager[_(-][^.]|PrivacyManager' => "PrivacyManager", '[a-z_]*_message_sender' => 'MessageSender',
'messages_manager[_(-](?![.]get[(][)])|MessagesManager' => 'MessagesManager',
'MessageThreadInfo' => 'MessageThreadInfo',
'MessageTtl' => 'MessageTtl',
'notification_manager[_(-](?![.]get[(][)])|NotificationManager|notifications[)]' => 'NotificationManager',
'notification_settings_manager[_(-](?![.]get[(][)])|NotificationSettingsManager' => 'NotificationSettingsManager',
'option_manager[_(-](?![.]get[(][)])|OptionManager' => 'OptionManager',
'password_manager[_(-](?![.]get[(][)])|PasswordManager' => 'PasswordManager',
'[a-z_]*phone_number_manager[_(-](?![.]get[(][)])|PhoneNumberManager' => 'PhoneNumberManager',
'PhotoSizeSource' => 'PhotoSizeSource',
'poll_manager[_(-](?![.]get[(][)])|PollManager' => 'PollManager',
'privacy_manager[_(-](?![.]get[(][)])|PrivacyManager' => 'PrivacyManager',
'PublicDialogType|get_public_dialog_type' => 'PublicDialogType', 'PublicDialogType|get_public_dialog_type' => 'PublicDialogType',
'reaction_manager[_(-][^.]|ReactionManager' => 'ReactionManager', 'ReactionListType|[a-z_]*_reaction_list_type' => 'ReactionListType',
'reaction_manager[_(-](?![.]get[(][)])|ReactionManager' => 'ReactionManager',
'ReactionType|[a-z_]*_reaction_type' => 'ReactionType',
'RequestActor|RequestOnceActor' => 'RequestActor',
'saved_messages_manager[_(-](?![.]get[(][)])|SavedMessagesManager' => 'SavedMessagesManager',
'ScopeNotificationSettings|[a-z_]*_scope_notification_settings' => 'ScopeNotificationSettings',
'SecretChatActor' => 'SecretChatActor', 'SecretChatActor' => 'SecretChatActor',
'secret_chats_manager[_(-]|SecretChatsManager' => 'SecretChatsManager', 'secret_chats_manager[_(-]|SecretChatsManager' => 'SecretChatsManager',
'sponsored_message_manager[_(-][^.]|SponsoredMessageManager' => 'SponsoredMessageManager', 'secure_manager[_(-](?![.]get[(][)])|SecureManager' => 'SecureManager',
'statistics_manager[_(-][^.]|StatisticsManager' => 'StatisticsManager', 'SentEmailCode' => 'SentEmailCode',
'stickers_manager[_(-][^.]|StickersManager' => 'StickersManager', 'sponsored_message_manager[_(-](?![.]get[(][)])|SponsoredMessageManager' => 'SponsoredMessageManager',
'story_manager[_(-][^.]|StoryManager' => 'StoryManager', 'state_manager[_(-](?![.]get[(][)])|StateManager' => 'StateManager',
'[>](td_db[(][)]|get_td_db_impl[(])|TdDb[^A-Za-z]' => 'TdDb', 'statistics_manager[_(-](?![.]get[(][)])|StatisticsManager' => 'StatisticsManager',
'theme_manager[_(-][^.]|ThemeManager' => "ThemeManager", 'StickerSetId' => 'StickerSetId',
'stickers_manager[_(-](?![.]get[(][)])|StickersManager' => 'StickersManager',
'storage_manager[_(-](?![.]get[(][)])|StorageManager' => 'StorageManager',
'StoryId' => 'StoryId',
'StoryListId' => 'StoryListId',
'story_manager[_(-](?![.]get[(][)])|StoryManager' => 'StoryManager',
'SuggestedAction|[a-z_]*_suggested_action' => 'SuggestedAction',
'td_api' => 'td_api',
'td_db[(][)]|TdDb[^A-Za-z]' => 'TdDb',
'telegram_api' => 'telegram_api',
'theme_manager[_(-](?![.]get[(][)])|ThemeManager' => 'ThemeManager',
'TopDialogCategory|get_top_dialog_category' => 'TopDialogCategory', 'TopDialogCategory|get_top_dialog_category' => 'TopDialogCategory',
'top_dialog_manager[_(-][^.]|TopDialogManager' => 'TopDialogManager', 'top_dialog_manager[_(-](?![.]get[(][)])|TopDialogManager' => 'TopDialogManager',
'translation_manager[_(-][^.]|TranslationManager' => "TranslationManager", 'translation_manager[_(-](?![.]get[(][)])|TranslationManager' => 'TranslationManager',
'updates_manager[_(-][^.]|UpdatesManager|get_difference[)]|updateSentMessage|dummyUpdate' => 'UpdatesManager', 'transcription_manager[_(-](?![.]get[(][)])|TranscriptionManager' => 'TranscriptionManager',
'updates_manager[_(-](?![.]get[(][)])|UpdatesManager|get_difference[)]|updateSentMessage|dummyUpdate' => 'UpdatesManager',
'UserId' => 'UserId',
'video_notes_manager[_(-](?![.]get[(][)])|VideoNotesManager' => 'VideoNotesManager',
'videos_manager[_(-](?![.]get[(][)])|VideosManager' => 'VideosManager',
'voice_notes_manager[_(-](?![.]get[(][)])|VoiceNotesManager' => 'VoiceNotesManager',
'WebPageId(Hash)?' => 'WebPageId', 'WebPageId(Hash)?' => 'WebPageId',
'web_pages_manager[_(-][^.]|WebPagesManager' => 'WebPagesManager'); 'web_pages_manager[_(-](?![.]get[(][)])|WebPagesManager' => 'WebPagesManager');
foreach ($td_methods as $pattern => $header) { foreach ($td_methods as $pattern => $header) {
if (strpos($cpp_name, $header) !== false) { if (strpos($cpp_name, $header) !== false) {
@ -332,7 +414,7 @@ function split_file($file, $chunks, $undo) {
} }
$include_name = '#include "td/telegram/'.$header.'.h"'; $include_name = '#include "td/telegram/'.$header.'.h"';
if (strpos($new_content, $include_name) !== false && preg_match('/'.$pattern.'/', str_replace($include_name, '', $new_content)) === 0) { if (strpos($new_content, $include_name) !== false && preg_match('/[^a-zA-Z0-9_]('.$pattern.')/', str_replace($include_name, '', $new_content)) === 0) {
$new_content = str_replace($include_name, '', $new_content); $new_content = str_replace($include_name, '', $new_content);
} }
} }

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -47,6 +47,7 @@ class HttpReaderBench final : public td::Benchmark {
td::HttpReader http_reader_; td::HttpReader http_reader_;
void start_up() final { void start_up() final {
writer_ = {};
reader_ = writer_.extract_reader(); reader_ = writer_.extract_reader();
http_reader_.init(&reader_, 10000, 0); http_reader_.init(&reader_, 10000, 0);
} }
@ -74,6 +75,7 @@ class BufferBench final : public td::Benchmark {
td::HttpReader http_reader_; td::HttpReader http_reader_;
void start_up() final { void start_up() final {
writer_ = {};
reader_ = writer_.extract_reader(); reader_ = writer_.extract_reader();
} }
}; };
@ -104,6 +106,7 @@ class FindBoundaryBench final : public td::Benchmark {
td::HttpReader http_reader_; td::HttpReader http_reader_;
void start_up() final { void start_up() final {
writer_ = {};
reader_ = writer_.extract_reader(); reader_ = writer_.extract_reader();
} }
}; };

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<title>TDLib build instructions</title> <title>TDLight build instructions</title>
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<style> <style>
:root { :root {
@ -193,7 +193,7 @@
<div class="main"> <div class="main">
<div id="languageSelectDiv"> <div id="languageSelectDiv">
<p>Choose a programming language from which you want to use TDLib:</p> <p>Choose a programming language from which you want to use TDLight:</p>
<select id="languageSelect" onchange="onLanguageChanged(false)" autofocus class="large"> <select id="languageSelect" onchange="onLanguageChanged(false)" autofocus class="large">
<option>Choose a programming language:</option> <option>Choose a programming language:</option>
<option>Python</option> <option>Python</option>
@ -226,7 +226,7 @@
</div> </div>
<div id="osSelectDiv" class="hide"> <div id="osSelectDiv" class="hide">
<p>Choose an operating system on which you want to use TDLib:</p> <p>Choose an operating system on which you want to use TDLight:</p>
<select id="osSelect" onchange="onOsChanged()" class="large"> <select id="osSelect" onchange="onOsChanged()" class="large">
<option>Choose an operating system:</option> <option>Choose an operating system:</option>
</select> </select>
@ -234,7 +234,7 @@
</div> </div>
<div id="linuxSelectDiv" class="hide"> <div id="linuxSelectDiv" class="hide">
<p>Choose a Linux distro on which you want to use TDLib:</p> <p>Choose a Linux distro on which you want to use TDLight:</p>
<select id="linuxSelect" onchange="onOsChanged()" class="large"> <select id="linuxSelect" onchange="onOsChanged()" class="large">
<option>Choose a Linux distro:</option> <option>Choose a Linux distro:</option>
<option>Alpine</option> <option>Alpine</option>
@ -263,13 +263,13 @@
</div> </div>
<div id="buildInstallLocalDiv" class="hide"> <div id="buildInstallLocalDiv" class="hide">
<label><input type="checkbox" id="buildInstallLocalCheckbox" onchange="onOptionsChanged()"/>Install built TDLib to /usr/local instead of placing the files to td/tdlib.</label> <label><input type="checkbox" id="buildInstallLocalCheckbox" onchange="onOptionsChanged()"/>Install built TDLight to /usr/local instead of placing the files to td/tdlib.</label>
</div> </div>
<p></p> <p></p>
<div id="buildCompilerDiv" class="hide"> <div id="buildCompilerDiv" class="hide">
<span>Choose which compiler you want to use to build TDLib:</span><br> <span>Choose which compiler you want to use to build TDLight:</span><br>
<label><input type="radio" id="buildCompilerRadioGcc" name="buildCompilerRadio" onchange="onOptionsChanged()" checked/>g++</label> <label><input type="radio" id="buildCompilerRadioGcc" name="buildCompilerRadio" onchange="onOptionsChanged()" checked/>g++</label>
<label><input type="radio" id="buildCompilerRadioClang" name="buildCompilerRadio" onchange="onOptionsChanged()"/>clang (recommended)</label> <label><input type="radio" id="buildCompilerRadioClang" name="buildCompilerRadio" onchange="onOptionsChanged()"/>clang (recommended)</label>
<p></p> <p></p>
@ -305,7 +305,7 @@
</div> </div>
<div id="buildBitnessDiv" class="hide"> <div id="buildBitnessDiv" class="hide">
<span>Choose for which bitness you want to build TDLib:</span><br> <span>Choose for which bitness you want to build TDLight:</span><br>
<label><input type="radio" id="buildBitnessRadio32" name="buildBitnessRadio" onchange="onOptionsChanged()" checked/>32</label> <label><input type="radio" id="buildBitnessRadio32" name="buildBitnessRadio" onchange="onOptionsChanged()" checked/>32</label>
<label><input type="radio" id="buildBitnessRadio64" name="buildBitnessRadio" onchange="onOptionsChanged()"/>64</label> <label><input type="radio" id="buildBitnessRadio64" name="buildBitnessRadio" onchange="onOptionsChanged()"/>64</label>
<p></p> <p></p>
@ -327,7 +327,7 @@
</div> </div>
<div id="buildCommandsDiv" class="hide"> <div id="buildCommandsDiv" class="hide">
<p id="buildCommandsHeader">Here is complete instruction for TDLib binaries building:</p> <p id="buildCommandsHeader">Here is complete instruction for TDLight binaries building:</p>
<p id="buildPre">Hidden text</p> <p id="buildPre">Hidden text</p>
<code id="buildCommands">Empty commands</code> <code id="buildCommands">Empty commands</code>
<button id="copyBuildCommandsButton" onclick="copyBuildInstructions()"> <button id="copyBuildCommandsButton" onclick="copyBuildInstructions()">
@ -494,14 +494,14 @@ function getTargetName(target) {
case 'tdjson': case 'tdjson':
case 'WebAssembly': case 'WebAssembly':
case 'iOS': case 'iOS':
return '<a href="https://github.com/tdlib/td#using-json">JSON</a>'; return '<a href="https://github.com/tdlight-team/tdlight#using-json">JSON</a>';
case 'tdclient': case 'tdclient':
return '<a href="https://github.com/tdlib/td#using-cxx">a simple and convenient C++11-interface</a>'; return '<a href="https://github.com/tdlight-team/tdlight#using-cxx">a simple and convenient C++11-interface</a>';
case 'JNI': case 'JNI':
case 'Android': case 'Android':
return '<a href="https://github.com/tdlib/td#using-java">native ' + target + '</a>'; return '<a href="https://github.com/tdlight-team/tdlight#using-java">native ' + target + '</a>';
default: default:
return '<a href="https://github.com/tdlib/td#using-dotnet">native ' + target + '</a>'; return '<a href="https://github.com/tdlight-team/tdlight#using-dotnet">native ' + target + '</a>';
} }
} }
@ -515,17 +515,17 @@ function onOsChanged() {
if (language === 'Other') { if (language === 'Other') {
language = 'any other programming language'; language = 'any other programming language';
} }
var text = 'TDLib can be used from ' + language + ' on ' + os + ' through the ' + getTargetName(target) + ' interface.<br>' + var text = 'TDLight can be used from ' + language + ' on ' + os + ' through the ' + getTargetName(target) + ' interface.<br>' +
'See <a href="https://github.com/tdlib/td/blob/master/example/README.md#' + getExampleAnchor(language) + '">examples</a> of such usage and already available third-party frameworks.<br>'; 'See <a href="https://github.com/tdlight-team/tdlight/blob/master/example/README.md#' + getExampleAnchor(language) + '">examples</a> of such usage and already available third-party frameworks.<br>';
if (target === 'WebAssembly') { if (target === 'WebAssembly') {
text = 'TDLib is available in a prebuilt form as an <a href="https://www.npmjs.com/">NPM</a> package <a href="https://www.npmjs.com/package/tdweb">tdweb</a>.<br>' + text = 'TDLight is available in a prebuilt form as an <a href="https://www.npmjs.com/">NPM</a> package <a href="https://www.npmjs.com/package/tdweb">tdweb</a>.<br>' +
'If you want to build it manually, take a look at our <a href="https://github.com/tdlib/td/tree/master/example/web">example</a>.'; 'If you want to build it manually, take a look at our <a href="https://github.com/tdlight-team/tdlight/tree/master/example/web">example</a>.';
target = ''; target = '';
} }
if (target === 'Android') { if (target === 'Android') {
text = 'TDLib for Android is available in a prebuilt form and can be downloaded from <a href="https://core.telegram.org/tdlib/tdlib.zip">there</a>.<br>' + text = 'TDLight for Android is available in a prebuilt form and can be downloaded from <a href="https://core.telegram.org/tdlight-team/tdlightlib.zip">there</a>.<br>' +
'See <a href="https://github.com/tdlib/td/issues/77#issuecomment-640719893">build instructions</a> if you want to build the latest TDLib version or want to build TDLib with different interface.'; 'See <a href="https://github.com/tdlight-team/tdlight/issues/77#issuecomment-640719893">build instructions</a> if you want to build the latest TDLight version or want to build TDLight with different interface.';
target = ''; target = '';
} }
if (target === 'iOS') { if (target === 'iOS') {
@ -590,7 +590,7 @@ function onOptionsChanged() {
if (os_linux || os_freebsd || os_netbsd) { if (os_linux || os_freebsd || os_netbsd) {
low_memory = document.getElementById('buildLowMemoryCheckbox').checked; low_memory = document.getElementById('buildLowMemoryCheckbox').checked;
document.getElementById('buildLowMemoryText').innerHTML = 'I have less than ' + (use_clang ? '1.5' : '3.5') +' GB of RAM.' + document.getElementById('buildLowMemoryText').innerHTML = 'I have less than ' + (use_clang ? '1.5' : '3.5') +' GB of RAM.' +
(low_memory ? ' Now you will need only ' + (use_clang ? '0.5' : '1') +' GB of RAM to build TDLib.' : ''); (low_memory ? ' Now you will need only ' + (use_clang ? '0.5' : '1') +' GB of RAM to build TDLight.' : '');
document.getElementById('buildLowMemoryDiv').style.display = 'block'; document.getElementById('buildLowMemoryDiv').style.display = 'block';
} else { } else {
if (os_openbsd) { if (os_openbsd) {
@ -740,7 +740,7 @@ function onOptionsChanged() {
pre_text.push('Note that for Node.js &ge; 17 you must build TDLib with OpenSSL 3.0.*, for Node.js &ge; 10 with OpenSSL 1.1.*, and for Node.js &lt; 10 with OpenSSL 1.0.*, so you may need to modify the following commands to install a proper OpenSSL version.'); pre_text.push('Note that for Node.js &ge; 17 you must build TDLib with OpenSSL 3.0.*, for Node.js &ge; 10 with OpenSSL 1.1.*, and for Node.js &lt; 10 with OpenSSL 1.0.*, so you may need to modify the following commands to install a proper OpenSSL version.');
} }
if (os_freebsd) { if (os_freebsd) {
pre_text.push('Note that the following instruction is for FreeBSD 11.'); pre_text.push('Note that the following instruction is for FreeBSD 13.');
pre_text.push('Note that the following calls to <code>pkg</code> needs to be run as <code>root</code>.'); pre_text.push('Note that the following calls to <code>pkg</code> needs to be run as <code>root</code>.');
} }
if (os_openbsd) { if (os_openbsd) {
@ -751,8 +751,8 @@ function onOptionsChanged() {
pre_text.push('Note that the following instruction is for NetBSD 8+ and default SH shell.'); pre_text.push('Note that the following instruction is for NetBSD 8+ and default SH shell.');
} }
if (os_mac) { if (os_mac) {
pre_text.push('Note that the following instruction will build TDLib only for ' + os_mac_host_name + '.'); pre_text.push('Note that the following instruction will build TDLight only for ' + os_mac_host_name + '.');
pre_text.push('If you want to create a universal XCFramework, take a look at our <a href="https://github.com/tdlib/td/tree/master/example/ios">example</a> instead.'); pre_text.push('If you want to create a universal XCFramework, take a look at our <a href="https://github.com/tdlight-team/tdlight/tree/master/example/ios">example</a> instead.');
} }
var terminal_name = (function () { var terminal_name = (function () {
@ -776,12 +776,12 @@ function onOptionsChanged() {
if (os_windows) { if (os_windows) {
pre_text.push('Close and re-open ' + terminal_name + ' if the PATH environment variable was changed.'); pre_text.push('Close and re-open ' + terminal_name + ' if the PATH environment variable was changed.');
} }
pre_text.push('Run these commands in ' + terminal_name + ' to build TDLib and to install it to ' + install_dir + ':'); pre_text.push('Run these commands in ' + terminal_name + ' to build TDLight and to install it to ' + install_dir + ':');
document.getElementById('buildPre').innerHTML = '<ul><li>' + pre_text.join('</li><li>') + '</li></ul>'; document.getElementById('buildPre').innerHTML = '<ul><li>' + pre_text.join('</li><li>') + '</li></ul>';
document.getElementById('buildPre').style.display = 'block'; document.getElementById('buildPre').style.display = 'block';
if (install_dir && install_dir !== '/usr/local') { if (install_dir && install_dir !== '/usr/local') {
install_dir = '../tdlib'; install_dir = '../tdlight';
if (target === 'JNI' || target === 'C++/CX') { if (target === 'JNI' || target === 'C++/CX') {
install_dir = '../../' + install_dir; install_dir = '../../' + install_dir;
} }
@ -896,9 +896,9 @@ function onOptionsChanged() {
} }
} else if (os_freebsd) { } else if (os_freebsd) {
commands.push(sudo + 'pkg upgrade'); commands.push(sudo + 'pkg upgrade');
var packages = 'git gperf php72 cmake'; var packages = 'git gperf php83 cmake';
if (target === 'JNI') { if (target === 'JNI') {
packages += ' openjdk'; packages += ' openjdk21';
} }
commands.push(sudo + 'pkg install ' + packages); commands.push(sudo + 'pkg install ' + packages);
} else if (os_openbsd) { } else if (os_openbsd) {
@ -926,15 +926,15 @@ function onOptionsChanged() {
commands.push('exit'); commands.push('exit');
} }
} }
commands.push('git clone https://github.com/tdlib/td.git'); commands.push('git clone https://github.com/tdlight-team/tdlight.git');
commands.push('cd td'); commands.push('cd tdlight');
// commands.push('git checkout v1.8.0'); // commands.push('git checkout v1.8.0');
if (use_vcpkg) { if (use_vcpkg) {
commands.push('git clone https://github.com/Microsoft/vcpkg.git'); commands.push('git clone https://github.com/Microsoft/vcpkg.git');
commands.push('cd vcpkg'); commands.push('cd vcpkg');
commands.push('git checkout 1b1ae50e1a69f7c659bd7d731e80b358d21c86ad'); commands.push('git checkout cd5e746ec203c8c3c61647e0886a8df8c1e78e41');
commands.push(local + 'bootstrap-vcpkg.bat'); commands.push(local + 'bootstrap-vcpkg.bat');
if (target === 'C++/CX') { if (target === 'C++/CX') {
commands.push(local + 'vcpkg.exe install gperf:x86-windows openssl:arm-uwp openssl:arm64-uwp openssl:x64-uwp openssl:x86-uwp zlib:arm-uwp zlib:arm64-uwp zlib:x64-uwp zlib:x86-uwp'); commands.push(local + 'vcpkg.exe install gperf:x86-windows openssl:arm-uwp openssl:arm64-uwp openssl:x64-uwp openssl:x86-uwp zlib:arm-uwp zlib:arm64-uwp zlib:x64-uwp zlib:x86-uwp');

View File

@ -1,7 +1,7 @@
# TDLib usage and build examples # TDLib usage and build examples
This directory contains basic examples of TDLib usage from different programming languages and examples of library building for different platforms. This directory contains basic examples of TDLib usage from different programming languages and examples of library building for different platforms.
If you are looking for documentation of all available TDLib methods, see the [td_api.tl](https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl) scheme or the If you are looking for documentation of all available TDLib methods, see the [td_api.tl](https://github.com/tdlight-team/tdlight/blob/master/td/generate/scheme/td_api.tl) scheme or the
automatically generated [HTML documentation](https://core.telegram.org/tdlib/docs/td__api_8h.html) for a list of all available TDLib automatically generated [HTML documentation](https://core.telegram.org/tdlib/docs/td__api_8h.html) for a list of all available TDLib
[methods](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html) and [classes](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html). [methods](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html) and [classes](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html).
Also, take a look at our [Getting Started](https://core.telegram.org/tdlib/getting-started) tutorial for a description of basic TDLib concepts. Also, take a look at our [Getting Started](https://core.telegram.org/tdlib/getting-started) tutorial for a description of basic TDLib concepts.
@ -54,13 +54,13 @@ If you want to use TDLib with asyncio and Python >= 3.9, take a look at [aiotdli
For older Python versions you can use [pytdlib](https://github.com/pytdlib/pytdlib). For older Python versions you can use [pytdlib](https://github.com/pytdlib/pytdlib).
This wrapper contains generator for TDLib API classes and basic interface for interaction with TDLib. This wrapper contains generator for TDLib API classes and basic interface for interaction with TDLib.
You can also check out [example/python/tdjson_example.py](https://github.com/tdlib/td/blob/master/example/python/tdjson_example.py), You can also check out [example/python/tdjson_example.py](https://github.com/tdlight-team/tdlight/blob/master/example/python/tdjson_example.py),
[tdlib-python](https://github.com/JunaidBabu/tdlib-python), or [Python Wrapper TDLib](https://github.com/alvhix/pywtdlib) for some basic examples of TDLib JSON interface integration with Python. [tdlib-python](https://github.com/JunaidBabu/tdlib-python), or [Python Wrapper TDLib](https://github.com/alvhix/pywtdlib) for some basic examples of TDLib JSON interface integration with Python.
<a name="javascript"></a> <a name="javascript"></a>
## Using TDLib in JavaScript projects ## Using TDLib in JavaScript projects
TDLib can be compiled to WebAssembly or asm.js and used in a browser from JavaScript. See [tdweb](https://github.com/tdlib/td/tree/master/example/web) as a convenient wrapper for TDLib in a browser TDLib can be compiled to WebAssembly or asm.js and used in a browser from JavaScript. See [tdweb](https://github.com/tdlight-team/tdlight/tree/master/example/web) as a convenient wrapper for TDLib in a browser
and [telegram-react](https://github.com/evgeny-nadymov/telegram-react) as an example of a TDLib-based Telegram client. and [telegram-react](https://github.com/evgeny-nadymov/telegram-react) as an example of a TDLib-based Telegram client.
See also [Svelte-tdweb-starter](https://github.com/gennadypolakov/svelte-tdweb-starter) - Svelte wrapper for tdweb, and [Telegram-Photoframe](https://github.com/lukefx/telegram-photoframe) - a web application that displays your preferred group or channel as Photoframe. See also [Svelte-tdweb-starter](https://github.com/gennadypolakov/svelte-tdweb-starter) - Svelte wrapper for tdweb, and [Telegram-Photoframe](https://github.com/lukefx/telegram-photoframe) - a web application that displays your preferred group or channel as Photoframe.
@ -95,7 +95,7 @@ You can also see [github.com/aliforever/go-tdlib](https://github.com/aliforever/
TDLib can be used from the Java programming language through native [JNI](https://github.com/tdlib/td#using-java) binding. TDLib can be used from the Java programming language through native [JNI](https://github.com/tdlib/td#using-java) binding.
We provide a generator for JNI bridge methods and Java classes for all TDLib API methods and objects. We provide a generator for JNI bridge methods and Java classes for all TDLib API methods and objects.
See [example/java](https://github.com/tdlib/td/tree/master/example/java) for an example of using TDLib from desktop Java along with detailed building and usage instructions. See [example/java](https://github.com/tdlight-team/tdlight/tree/master/example/java) for an example of using TDLib from desktop Java along with detailed building and usage instructions.
To use TDLib to create Android Java applications, use our [prebuilt library for Android](https://core.telegram.org/tdlib/tdlib.zip). To use TDLib to create Android Java applications, use our [prebuilt library for Android](https://core.telegram.org/tdlib/tdlib.zip).
<a name="kotlin"></a> <a name="kotlin"></a>
@ -112,8 +112,8 @@ See also [td-ktx](https://github.com/tdlibx/td-ktx) - Kotlin coroutines wrapper
TDLib provides a native [.NET](https://github.com/tdlib/td#using-dotnet) interface through `C++/CLI` and `C++/CX`. TDLib provides a native [.NET](https://github.com/tdlib/td#using-dotnet) interface through `C++/CLI` and `C++/CX`.
See [tdlib-netcore](https://github.com/dantmnf/tdlib-netcore) for a SWIG-like binding with automatically generated classes for TDLib API. See [tdlib-netcore](https://github.com/dantmnf/tdlib-netcore) for a SWIG-like binding with automatically generated classes for TDLib API.
See [example/uwp](https://github.com/tdlib/td/tree/master/example/uwp) for an example of building TDLib SDK for the Universal Windows Platform and an example of its usage from C#. See [example/uwp](https://github.com/tdlight-team/tdlight/tree/master/example/uwp) for an example of building TDLib SDK for the Universal Windows Platform and an example of its usage from C#.
See [example/csharp](https://github.com/tdlib/td/tree/master/example/csharp) for an example of building TDLib with `C++/CLI` support and an example of TDLib usage from C# on Windows. See [example/csharp](https://github.com/tdlight-team/tdlight/tree/master/example/csharp) for an example of building TDLib with `C++/CLI` support and an example of TDLib usage from C# on Windows.
If you want to write a cross-platform C# application using .NET Core, see [tdsharp](https://github.com/egramtel/tdsharp). It uses our [JSON](https://github.com/tdlib/td#using-json) interface, If you want to write a cross-platform C# application using .NET Core, see [tdsharp](https://github.com/egramtel/tdsharp). It uses our [JSON](https://github.com/tdlib/td#using-json) interface,
provides an asynchronous interface for interaction with TDLib, automatically generated classes for TDLib API and has some examples. provides an asynchronous interface for interaction with TDLib, automatically generated classes for TDLib API and has some examples.
@ -127,8 +127,8 @@ Also, see [Unigram](https://github.com/UnigramDev/Unigram), which is a full-feat
TDLib has a simple and convenient C++11-interface for sending and receiving requests and can be statically linked to your application. TDLib has a simple and convenient C++11-interface for sending and receiving requests and can be statically linked to your application.
See [example/cpp](https://github.com/tdlib/td/tree/master/example/cpp) for an example of TDLib usage from C++. See [example/cpp](https://github.com/tdlight-team/tdlight/tree/master/example/cpp) for an example of TDLib usage from C++.
[td_example.cpp](https://github.com/tdlib/td/blob/master/example/cpp/td_example.cpp) contains an example of authorization, processing new incoming messages, getting a list of chats and sending a text message. [td_example.cpp](https://github.com/tdlight-team/tdlight/blob/master/example/cpp/td_example.cpp) contains an example of authorization, processing new incoming messages, getting a list of chats and sending a text message.
See also the source code of [Fernschreiber](https://github.com/Wunderfitz/harbour-fernschreiber) and [Depecher](https://github.com/blacksailer/depecher) – Telegram apps for Sailfish OS, See also the source code of [Fernschreiber](https://github.com/Wunderfitz/harbour-fernschreiber) and [Depecher](https://github.com/blacksailer/depecher) – Telegram apps for Sailfish OS,
[TELEports](https://gitlab.com/ubports/development/apps/teleports) – a Qt-client for Ubuntu Touch, [tdlib-purple](https://github.com/ars3niy/tdlib-purple) - Telegram plugin for Pidgin, [TELEports](https://gitlab.com/ubports/development/apps/teleports) – a Qt-client for Ubuntu Touch, [tdlib-purple](https://github.com/ars3niy/tdlib-purple) - Telegram plugin for Pidgin,
@ -140,20 +140,20 @@ or [MeeGram](https://github.com/qtinsider/meegram2) - a Telegram client for Noki
TDLib can be used from the Swift programming language through the [JSON](https://github.com/tdlib/td#using-json) interface and can be linked statically or dynamically. TDLib can be used from the Swift programming language through the [JSON](https://github.com/tdlib/td#using-json) interface and can be linked statically or dynamically.
See [example/ios](https://github.com/tdlib/td/tree/master/example/ios) for an example of building TDLib for iOS, watchOS, tvOS, and macOS. See [example/ios](https://github.com/tdlight-team/tdlight/tree/master/example/ios) for an example of building TDLib for iOS, watchOS, tvOS, and macOS.
See [TDLibKit](https://github.com/Swiftgram/TDLibKit), [tdlib-swift](https://github.com/modestman/tdlib-swift), or [TDLib-iOS](https://github.com/leoMehlig/TDLib-iOS), which provide convenient TDLib clients with automatically generated and fully-documented classes for all TDLib API methods and objects. See [TDLibKit](https://github.com/Swiftgram/TDLibKit), [tdlib-swift](https://github.com/modestman/tdlib-swift), or [TDLib-iOS](https://github.com/leoMehlig/TDLib-iOS), which provide convenient TDLib clients with automatically generated and fully-documented classes for all TDLib API methods and objects.
See also the source code of [Moc](https://github.com/mock-foundation/moc) - a native and powerful macOS and iPadOS Telegram client, optimized for moderating large communities and personal use. See also the source code of [Moc](https://github.com/mock-foundation/moc) - a native and powerful macOS and iPadOS Telegram client, optimized for moderating large communities and personal use.
See [example/swift](https://github.com/tdlib/td/tree/master/example/swift) for an example of a macOS Swift application. See [example/swift](https://github.com/tdlight-team/tdlight/tree/master/example/swift) for an example of a macOS Swift application.
<a name="objective-c"></a> <a name="objective-c"></a>
## Using TDLib in Objective-C projects ## Using TDLib in Objective-C projects
TDLib can be used from the Objective-C programming language through [JSON](https://github.com/tdlib/td#using-json) interface and can be linked statically or dynamically. TDLib can be used from the Objective-C programming language through [JSON](https://github.com/tdlib/td#using-json) interface and can be linked statically or dynamically.
See [example/ios](https://github.com/tdlib/td/tree/master/example/ios) for an example of building TDLib for iOS, watchOS, tvOS, and macOS. See [example/ios](https://github.com/tdlight-team/tdlight/tree/master/example/ios) for an example of building TDLib for iOS, watchOS, tvOS, and macOS.
<a name="object-pascal"></a> <a name="object-pascal"></a>
## Using TDLib in Object Pascal projects with Delphi and Lazarus ## Using TDLib in Object Pascal projects with Delphi and Lazarus
@ -300,7 +300,7 @@ TDLib can be used from the C programming language through the [JSON](https://git
See [easy-tg](https://github.com/Trumeet/easy-tg) for an example of such usage. See [easy-tg](https://github.com/Trumeet/easy-tg) for an example of such usage.
You can also try to use our [C](https://github.com/tdlib/td/blob/master/td/telegram/td_c_client.h) client, which was used by the private TDLib-based version of [telegram-cli](https://github.com/vysheng/tg). You can also try to use our [C](https://github.com/tdlight-team/tdlight/blob/master/td/telegram/td_c_client.h) client, which was used by the private TDLib-based version of [telegram-cli](https://github.com/vysheng/tg).
<a name="g"></a> <a name="g"></a>
## Using TDLib from G projects ## Using TDLib from G projects

View File

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
project(TdExample VERSION 1.0 LANGUAGES CXX) project(TdExample VERSION 1.0 LANGUAGES CXX)
find_package(Td 1.8.21 REQUIRED) find_package(Td 1.8.25 REQUIRED)
add_executable(tdjson_example tdjson_example.cpp) add_executable(tdjson_example tdjson_example.cpp)
target_link_libraries(tdjson_example PRIVATE Td::TdJson) target_link_libraries(tdjson_example PRIVATE Td::TdJson)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -291,7 +291,7 @@ class TdExample {
std::cin >> first_name; std::cin >> first_name;
std::cout << "Enter your last name: " << std::flush; std::cout << "Enter your last name: " << std::flush;
std::cin >> last_name; std::cin >> last_name;
send_query(td_api::make_object<td_api::registerUser>(first_name, last_name), send_query(td_api::make_object<td_api::registerUser>(first_name, last_name, false),
create_authentication_query_handler()); create_authentication_query_handler());
}, },
[this](td_api::authorizationStateWaitPassword &) { [this](td_api::authorizationStateWaitPassword &) {
@ -314,7 +314,6 @@ class TdExample {
request->system_language_code_ = "en"; request->system_language_code_ = "en";
request->device_model_ = "Desktop"; request->device_model_ = "Desktop";
request->application_version_ = "1.0"; request->application_version_ = "1.0";
request->enable_storage_optimizer_ = true;
send_query(std::move(request), create_authentication_query_handler()); send_query(std::move(request), create_authentication_query_handler());
})); }));
} }

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -10,7 +10,7 @@ This is an example of building TDLib with `C++/CLI` support and an example of TD
``` ```
git clone https://github.com/Microsoft/vcpkg.git git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg cd vcpkg
git checkout 1b1ae50e1a69f7c659bd7d731e80b358d21c86ad git checkout cd5e746ec203c8c3c61647e0886a8df8c1e78e41
.\bootstrap-vcpkg.bat .\bootstrap-vcpkg.bat
.\vcpkg.exe install gperf:x64-windows gperf:x86-windows openssl:x64-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows .\vcpkg.exe install gperf:x64-windows gperf:x86-windows openssl:x64-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows
``` ```

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -76,7 +76,6 @@ namespace TdExample
request.SystemLanguageCode = "en"; request.SystemLanguageCode = "en";
request.DeviceModel = "Desktop"; request.DeviceModel = "Desktop";
request.ApplicationVersion = "1.0"; request.ApplicationVersion = "1.0";
request.EnableStorageOptimizer = true;
_client.Send(request, new AuthorizationRequestHandler()); _client.Send(request, new AuthorizationRequestHandler());
} }
@ -108,7 +107,7 @@ namespace TdExample
{ {
string firstName = ReadLine("Please enter your first name: "); string firstName = ReadLine("Please enter your first name: ");
string lastName = ReadLine("Please enter your last name: "); string lastName = ReadLine("Please enter your last name: ");
_client.Send(new TdApi.RegisterUser(firstName, lastName), new AuthorizationRequestHandler()); _client.Send(new TdApi.RegisterUser(firstName, lastName, false), new AuthorizationRequestHandler());
} }
else if (_authorizationState is TdApi.AuthorizationStateWaitPassword) else if (_authorizationState is TdApi.AuthorizationStateWaitPassword)
{ {

View File

@ -93,22 +93,22 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'x86' "> <ItemGroup Condition=" '$(Platform)' == 'x86' ">
<Content Include="build\$(Configuration)\libcrypto-1_1.dll"> <Content Include="build\$(Configuration)\libcrypto-3.dll">
<Link>libcrypto-1_1.dll</Link> <Link>libcrypto-3.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="build\$(Configuration)\libssl-1_1.dll"> <Content Include="build\$(Configuration)\libssl-3.dll">
<Link>libssl-1_1.dll</Link> <Link>libssl-3.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'x64' "> <ItemGroup Condition=" '$(Platform)' == 'x64' ">
<Content Include="build64\$(Configuration)\libcrypto-1_1-x64.dll"> <Content Include="build64\$(Configuration)\libcrypto-3-x64.dll">
<Link>libcrypto-1_1-x64.dll</Link> <Link>libcrypto-3-x64.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="build64\$(Configuration)\libssl-1_1-x64.dll"> <Content Include="build64\$(Configuration)\libssl-3-x64.dll">
<Link>libssl-1_1-x64.dll</Link> <Link>libssl-3-x64.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>

View File

@ -4,7 +4,7 @@ Below are instructions for building TDLib for iOS, watchOS, tvOS, and also macOS
If you need only a macOS build for the current architecture, take a look at [TDLib build instructions generator](https://tdlib.github.io/td/build.html). If you need only a macOS build for the current architecture, take a look at [TDLib build instructions generator](https://tdlib.github.io/td/build.html).
For example of usage take a look at our [Swift example](https://github.com/tdlib/td/tree/master/example/swift). For example of usage take a look at our [Swift example](https://github.com/tdlight-team/tdlight/tree/master/example/swift).
To compile `TDLib` you will need to: To compile `TDLib` you will need to:
* Install the latest Xcode via `xcode-select --install` or downloading it from [Xcode website](https://developer.apple.com/xcode/). * Install the latest Xcode via `xcode-select --install` or downloading it from [Xcode website](https://developer.apple.com/xcode/).
@ -37,7 +37,7 @@ cd <path to TDLib sources>/example/ios
``` ```
This may take a while, because TDLib will be built about 16 times. This may take a while, because TDLib will be built about 16 times.
Resulting XCFramework will work on any architecture and even on a simulator. Resulting XCFramework will work on any architecture and even on a simulator.
We use [CMake/iOS.cmake](https://github.com/tdlib/td/blob/master/CMake/iOS.cmake) toolchain, other toolchains may work too. We use [CMake/iOS.cmake](https://github.com/tdlight-team/tdlight/blob/master/CMake/iOS.cmake) toolchain, other toolchains may work too.
Built libraries and XCFramework will be stored in `tdjson` directory. Built libraries and XCFramework will be stored in `tdjson` directory.

View File

@ -3,7 +3,7 @@
To run this example, you will need installed JDK >= 1.6. To run this example, you will need installed JDK >= 1.6.
For Javadoc documentation generation PHP is needed. For Javadoc documentation generation PHP is needed.
You can find complete build instructions for your operating system at https://tdlib.github.io/td/build.html?language=Java. You can find complete build instructions for your operating system at https://tdlight-team.github.io/tdlight/build.html?language=Java.
In general, the build process looks as follows. In general, the build process looks as follows.

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -119,12 +119,12 @@ public final class Client {
* @return request result. * @return request result.
* @throws ExecutionException if query execution fails. * @throws ExecutionException if query execution fails.
*/ */
@SuppressWarnings("unchecked")
public static <T extends TdApi.Object> T execute(TdApi.Function<T> query) throws ExecutionException { public static <T extends TdApi.Object> T execute(TdApi.Function<T> query) throws ExecutionException {
TdApi.Object object = nativeClientExecute(query); TdApi.Object object = nativeClientExecute(query);
if (object instanceof TdApi.Error) { if (object instanceof TdApi.Error) {
throw new ExecutionException((TdApi.Error) object); throw new ExecutionException((TdApi.Error) object);
} }
//noinspection unchecked
return (T) object; return (T) object;
} }

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -102,7 +102,6 @@ public final class Example {
request.systemLanguageCode = "en"; request.systemLanguageCode = "en";
request.deviceModel = "Desktop"; request.deviceModel = "Desktop";
request.applicationVersion = "1.0"; request.applicationVersion = "1.0";
request.enableStorageOptimizer = true;
client.send(request, new AuthorizationRequestHandler()); client.send(request, new AuthorizationRequestHandler());
break; break;
@ -134,7 +133,7 @@ public final class Example {
case TdApi.AuthorizationStateWaitRegistration.CONSTRUCTOR: { case TdApi.AuthorizationStateWaitRegistration.CONSTRUCTOR: {
String firstName = promptString("Please enter your first name: "); String firstName = promptString("Please enter your first name: ");
String lastName = promptString("Please enter your last name: "); String lastName = promptString("Please enter your last name: ");
client.send(new TdApi.RegisterUser(firstName, lastName), new AuthorizationRequestHandler()); client.send(new TdApi.RegisterUser(firstName, lastName, false), new AuthorizationRequestHandler());
break; break;
} }
case TdApi.AuthorizationStateWaitPassword.CONSTRUCTOR: { case TdApi.AuthorizationStateWaitPassword.CONSTRUCTOR: {

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,6 +1,6 @@
# #
# Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com), # Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com),
# Pellegrino Prevete (pellegrinoprevete@gmail.com) 2014-2023 # Pellegrino Prevete (pellegrinoprevete@gmail.com) 2014-2024
# #
# Distributed under the Boost Software License, Version 1.0. (See accompanying # Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -8,12 +8,16 @@
from ctypes.util import find_library from ctypes.util import find_library
from ctypes import * from ctypes import *
import json import json
import os
import sys import sys
# load shared library # load shared library
tdjson_path = find_library('tdjson') or 'tdjson.dll' tdjson_path = find_library('tdjson')
if tdjson_path is None: if tdjson_path is None:
sys.exit("Can't find 'tdjson' library") if os.name == 'nt':
tdjson_path = os.path.join(os.path.dirname(__file__), 'tdjson.dll')
else:
sys.exit("Can't find 'tdjson' library")
tdjson = CDLL(tdjson_path) tdjson = CDLL(tdjson_path)
# load TDLib functions from shared library # load TDLib functions from shared library
@ -102,8 +106,7 @@ while True:
'api_hash': 'a3406de8d171bb422bb6ddf3bbd800e2', 'api_hash': 'a3406de8d171bb422bb6ddf3bbd800e2',
'system_language_code': 'en', 'system_language_code': 'en',
'device_model': 'Desktop', 'device_model': 'Desktop',
'application_version': '1.0', 'application_version': '1.0'})
'enable_storage_optimizer': True})
# enter phone number to log in # enter phone number to log in
if auth_state['@type'] == 'authorizationStateWaitPhoneNumber': if auth_state['@type'] == 'authorizationStateWaitPhoneNumber':

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -114,8 +114,7 @@ func updateAuthorizationState(authorizationState: Dictionary<String, Any>) {
"api_hash":"a3406de8d171bb422bb6ddf3bbd800e2", "api_hash":"a3406de8d171bb422bb6ddf3bbd800e2",
"system_language_code":"en", "system_language_code":"en",
"device_model":"Desktop", "device_model":"Desktop",
"application_version":"1.0", "application_version":"1.0"
"enable_storage_optimizer":true
]); ]);
case "authorizationStateWaitPhoneNumber": case "authorizationStateWaitPhoneNumber":

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -10,7 +10,7 @@ This is an example of building TDLib SDK for Universal Windows Platform and an e
``` ```
git clone https://github.com/Microsoft/vcpkg.git git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg cd vcpkg
git checkout 1b1ae50e1a69f7c659bd7d731e80b358d21c86ad git checkout cd5e746ec203c8c3c61647e0886a8df8c1e78e41
.\bootstrap-vcpkg.bat .\bootstrap-vcpkg.bat
.\vcpkg.exe install gperf:x86-windows openssl:arm-uwp openssl:arm64-uwp openssl:x64-uwp openssl:x86-uwp zlib:arm-uwp zlib:arm64-uwp zlib:x64-uwp zlib:x86-uwp .\vcpkg.exe install gperf:x86-windows openssl:arm-uwp openssl:arm64-uwp openssl:x64-uwp openssl:x86-uwp zlib:arm-uwp zlib:arm64-uwp zlib:x64-uwp zlib:x86-uwp
``` ```

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd"> <package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata> <metadata>
<id>Telegram.Td.UWP</id> <id>Telegram.Td.UWP</id>
<version>1.8.21</version> <version>1.8.25</version>
<title>TDLib for Universal Windows Platform</title> <title>TDLib for Universal Windows Platform</title>
<authors>Telegram</authors> <authors>Telegram</authors>
<owners>Telegram</owners> <owners>Telegram</owners>

View File

@ -9,12 +9,12 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'UAP'"> <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'UAP'">
<Reference Include="$(MSBuildThisFileDirectory)..\..\lib\uap10.0\Telegram.Td.winmd"> <Reference Include="$(MSBuildThisFileDirectory)..\..\lib\uap10.0\Telegram.Td.winmd">
<Implementation>Telegram.Td.dll</Implementation> <Implementation>Telegram.Td.dll</Implementation>
</Reference> </Reference>
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(TelegramTdPlatform)\native\Telegram.Td.dll" /> <ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(TelegramTdPlatform)\native\Telegram.Td.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(TelegramTdPlatform)\native\libcrypto-1_1$(OpenSSLPlatform).dll" /> <ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(TelegramTdPlatform)\native\libcrypto-3$(OpenSSLPlatform).dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(TelegramTdPlatform)\native\libssl-1_1$(OpenSSLPlatform).dll" /> <ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(TelegramTdPlatform)\native\libssl-3$(OpenSSLPlatform).dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(TelegramTdPlatform)\native\zlib1.dll" /> <ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(TelegramTdPlatform)\native\zlib1.dll" />
</ItemGroup> </ItemGroup>

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("App2")] [assembly: AssemblyProduct("App2")]
[assembly: AssemblyCopyright("Copyright © 2015-2023")] [assembly: AssemblyCopyright("Copyright © 2015-2024")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

View File

@ -1,12 +1,12 @@
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011"> <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011">
<Metadata> <Metadata>
<Identity Id="Telegram.Td.UWP" Version="1.8.21" Language="en-US" Publisher="Telegram LLC" /> <Identity Id="Telegram.Td.UWP" Version="1.8.25" Language="en-US" Publisher="Telegram LLC" />
<DisplayName>TDLib for Universal Windows Platform</DisplayName> <DisplayName>TDLib for Universal Windows Platform</DisplayName>
<Description>TDLib is a library for building Telegram clients</Description> <Description>TDLib is a library for building Telegram clients</Description>
<MoreInfo>https://core.telegram.org/tdlib</MoreInfo> <MoreInfo>https://core.telegram.org/tdlib</MoreInfo>
<Tags>Telegram, TDLib, library, client, API</Tags> <Tags>Telegram, TDLib, library, client, API</Tags>
<License>LICENSE_1_0.txt</License> <License>LICENSE_1_0.txt</License>
<ReleaseNotes>https://github.com/tdlib/td/blob/master/CHANGELOG.md</ReleaseNotes> <ReleaseNotes>https://github.com/tdlight-team/tdlight/blob/master/CHANGELOG.md</ReleaseNotes>
</Metadata> </Metadata>
<Installation Scope="Global"> <Installation Scope="Global">
<InstallationTarget Id="Microsoft.ExtensionSDK" TargetPlatformIdentifier="UAP" TargetPlatformVersion="v0.8.0.0" SdkName="Telegram.Td.UWP" SdkVersion="1.0" /> <InstallationTarget Id="Microsoft.ExtensionSDK" TargetPlatformIdentifier="UAP" TargetPlatformVersion="v0.8.0.0" SdkName="Telegram.Td.UWP" SdkVersion="1.0" />

View File

@ -26,4 +26,4 @@ cd <path to TDLib sources>/example/web
## Using tdweb NPM package ## Using tdweb NPM package
See [tdweb](https://www.npmjs.com/package/tdweb) or [README.md](https://github.com/tdlib/td/tree/master/example/web/tdweb/README.md) for package documentation. See [tdweb](https://www.npmjs.com/package/tdweb) or [README.md](https://github.com/tdlight-team/tdlight/tree/master/example/web/tdweb/README.md) for package documentation.

View File

@ -8,11 +8,11 @@ Once this is done, you can send queries to the TDLib instance using the method `
See [Getting Started](https://core.telegram.org/tdlib/getting-started) for a description of basic TDLib concepts and a short introduction to TDLib usage. See [Getting Started](https://core.telegram.org/tdlib/getting-started) for a description of basic TDLib concepts and a short introduction to TDLib usage.
See the [td_api.tl](https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl) scheme or See the [td_api.tl](https://github.com/tdlight-team/tdlight/blob/master/td/generate/scheme/td_api.tl) scheme or
the automatically generated [HTML documentation](https://core.telegram.org/tdlib/docs/td__api_8h.html) for a list of all available the automatically generated [HTML documentation](https://core.telegram.org/tdlib/docs/td__api_8h.html) for a list of all available
TDLib [methods](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html) and [classes](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html). TDLib [methods](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html) and [classes](https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html).
The JSON representation of TDLib API objects is straightforward: all API objects are represented as JSON objects with the same keys as the API object field names in the The JSON representation of TDLib API objects is straightforward: all API objects are represented as JSON objects with the same keys as the API object field names in the
[td_api.tl](https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl) scheme. Note that in the automatically generated C++ documentation all fields have an additional terminating underscore [td_api.tl](https://github.com/tdlight-team/tdlight/blob/master/td/generate/scheme/td_api.tl) scheme. Note that in the automatically generated C++ documentation all fields have an additional terminating underscore
which shouldn't be used in the JSON interface. The object type name is stored in the special field '@type' which is optional in places where type is uniquely determined by the context. which shouldn't be used in the JSON interface. The object type name is stored in the special field '@type' which is optional in places where type is uniquely determined by the context.
Fields of Bool type are stored as Boolean, fields of int32, int53, and double types are stored as Number, fields of int64 and string types are stored as String, Fields of Bool type are stored as Boolean, fields of int32, int53, and double types are stored as Number, fields of int64 and string types are stored as String,
fields of bytes type are base64 encoded and then stored as String, fields of array type are stored as Array. fields of bytes type are base64 encoded and then stored as String, fields of array type are stored as Array.

View File

@ -21,7 +21,7 @@ const sleep = ms => new Promise(res => setTimeout(res, ms));
* 2. Added the method <code>setJsLogVerbosityLevel new_verbosity_level:string = Ok;</code>, which allows to change the verbosity level of tdweb logging.<br> * 2. Added the method <code>setJsLogVerbosityLevel new_verbosity_level:string = Ok;</code>, which allows to change the verbosity level of tdweb logging.<br>
* 3. Added the possibility to use blobs as input files via the constructor <code>inputFileBlob data:<JavaScript blob> = InputFile;</code>.<br> * 3. Added the possibility to use blobs as input files via the constructor <code>inputFileBlob data:<JavaScript blob> = InputFile;</code>.<br>
* 4. The class <code>filePart</code> contains data as a JavaScript blob instead of a base64-encoded string.<br> * 4. The class <code>filePart</code> contains data as a JavaScript blob instead of a base64-encoded string.<br>
* 5. The methods <code>getStorageStatistics</code>, <code>getStorageStatisticsFast</code>, <code>optimizeStorage</code>, <code>addProxy</code> and <code>getFileDownloadedPrefixSize</code> are not supported.<br> * 5. The methods <code>getStorageStatistics</code>, <code>getStorageStatisticsFast</code>, <code>optimizeStorage</code>, and <code>addProxy</code> are not supported.<br>
* <br> * <br>
*/ */
class TdClient { class TdClient {
@ -34,7 +34,7 @@ class TdClient {
* Create TdClient. * Create TdClient.
* @param {Object} options - Options for TDLib instance creation. * @param {Object} options - Options for TDLib instance creation.
* @param {TdClient~updateCallback} options.onUpdate - Callback for all incoming updates. * @param {TdClient~updateCallback} options.onUpdate - Callback for all incoming updates.
* @param {string} [options.instanceName=tdlib] - Name of the TDLib instance. Currently only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name. * @param {string} [options.instanceName=tdlib] - Name of the TDLib instance. Currently, only one instance of TdClient with a given name is allowed. All but one instances with the same name will be automatically closed. Usually, the newest non-background instance is kept alive. Files will be stored in an IndexedDb table with the same name.
* @param {boolean} [options.isBackground=false] - Pass true if the instance is opened from the background. * @param {boolean} [options.isBackground=false] - Pass true if the instance is opened from the background.
* @param {string} [options.jsLogVerbosityLevel=info] - The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug'). * @param {string} [options.jsLogVerbosityLevel=info] - The initial verbosity level of the JavaScript part of the code (one of 'error', 'warning', 'info', 'log', 'debug').
* @param {number} [options.logVerbosityLevel=2] - The initial verbosity level for the TDLib internal logging (0-1023). * @param {number} [options.logVerbosityLevel=2] - The initial verbosity level for the TDLib internal logging (0-1023).
@ -65,7 +65,7 @@ class TdClient {
* *
* If the query contains the field '@extra', the same field will be added into the result. * If the query contains the field '@extra', the same field will be added into the result.
* *
* @param {Object} query - The query for TDLib. See the [td_api.tl]{@link https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl} scheme or * @param {Object} query - The query for TDLib. See the [td_api.tl]{@link https://github.com/tdlight-team/tdlight/blob/master/td/generate/scheme/td_api.tl} scheme or
* the automatically generated [HTML documentation]{@link https://core.telegram.org/tdlib/docs/td__api_8h.html} * the automatically generated [HTML documentation]{@link https://core.telegram.org/tdlib/docs/td__api_8h.html}
* for a list of all available TDLib [methods]{@link https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html} and * for a list of all available TDLib [methods]{@link https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html} and
* [classes]{@link https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html}. * [classes]{@link https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_object.html}.

View File

@ -1,9 +0,0 @@
$commit = try { git rev-parse HEAD } catch { "unknown" }
try { git diff-index --quiet HEAD } catch {}
$dirty = if ($LASTEXITCODE) { "true" } else { "false" }
echo "#pragma once`r`n#define GIT_COMMIT `"$commit`"`r`n#define GIT_DIRTY $dirty" | out-file -encoding ASCII auto/git_info.h.new
if (-not (Test-Path .\auto\git_info.h) -or (Compare-Object $(Get-Content .\auto\git_info.h.new) $(Get-Content .\auto\git_info.h))) {
mv -Force auto/git_info.h.new auto/git_info.h
} else {
rm auto/git_info.h.new
}

View File

@ -1,18 +0,0 @@
#!/bin/sh
cd $(dirname $0)
commit="$(git rev-parse HEAD 2> /dev/null)"
commit="${commit:-unknown}"
git diff-index --quiet HEAD 2> /dev/null
if [ $? -ne 0 ]
then
dirty="true"
else
dirty="false"
fi
printf "#pragma once\n#define GIT_COMMIT \"$commit\"\n#define GIT_DIRTY $dirty\n" > auto/git_info.h.new
if cmp -s auto/git_info.h.new auto/git_info.h 2>&1 > /dev/null
then
rm -f auto/git_info.h.new
else
mv -f auto/git_info.h.new auto/git_info.h
fi

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -41,7 +41,7 @@ static std::atomic<std::size_t> total_memory_used;
void register_xalloc(malloc_info *info, std::int32_t diff) { void register_xalloc(malloc_info *info, std::int32_t diff) {
my_assert(info->size >= 0); my_assert(info->size >= 0);
// TODO: this is very slow in case of several threads. // TODO: this is very slow in case of several threads.
// Currently this statistics is intended only for memory benchmarks. // Currently, the statistics are intended only for memory benchmarks.
total_memory_used.fetch_add(diff * info->size, std::memory_order_relaxed); total_memory_used.fetch_add(diff * info->size, std::memory_order_relaxed);
} }

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

1
td/generate/scheme/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.tlo

File diff suppressed because it is too large Load Diff

View File

@ -103,7 +103,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#eb602f25 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 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.7?int background_emoji_id:flags2.6?long = User; user#215c4438 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<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 = 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;
@ -111,18 +111,18 @@ userProfilePhoto#82d1f706 flags:# has_video:flags.0?true personal:flags.2?true p
userStatusEmpty#9d05049 = UserStatus; userStatusEmpty#9d05049 = UserStatus;
userStatusOnline#edb93949 expires:int = UserStatus; userStatusOnline#edb93949 expires:int = UserStatus;
userStatusOffline#8c703f was_online:int = UserStatus; userStatusOffline#8c703f was_online:int = UserStatus;
userStatusRecently#e26f42f1 = UserStatus; userStatusRecently#7b197dc8 flags:# by_me:flags.0?true = UserStatus;
userStatusLastWeek#7bf09fc = UserStatus; userStatusLastWeek#541a1d1a flags:# by_me:flags.0?true = UserStatus;
userStatusLastMonth#77ebc742 = UserStatus; userStatusLastMonth#65899777 flags:# by_me:flags.0?true = UserStatus;
chatEmpty#29562865 id:long = Chat; chatEmpty#29562865 id:long = Chat;
chat#41cbf256 flags:# creator:flags.0?true left:flags.2?true deactivated:flags.5?true call_active:flags.23?true call_not_empty:flags.24?true noforwards:flags.25?true id:long title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat; chat#41cbf256 flags:# creator:flags.0?true left:flags.2?true deactivated:flags.5?true call_active:flags.23?true call_not_empty:flags.24?true noforwards:flags.25?true id:long title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat;
chatForbidden#6592a1a7 id:long title:string = Chat; chatForbidden#6592a1a7 id:long title:string = Chat;
channel#1981ea7e flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true join_to_send:flags.28?true join_request:flags.29?true forum:flags.30?true flags2:# stories_hidden:flags2.1?true stories_hidden_min:flags2.2?true stories_unavailable:flags2.3?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int usernames:flags2.0?Vector<Username> stories_max_id:flags2.4?int color:flags2.6?int background_emoji_id:flags2.5?long = Chat; channel#aadfc8f flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true join_to_send:flags.28?true join_request:flags.29?true forum:flags.30?true flags2:# stories_hidden:flags2.1?true stories_hidden_min:flags2.2?true stories_unavailable:flags2.3?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int usernames:flags2.0?Vector<Username> stories_max_id:flags2.4?int color:flags2.7?PeerColor profile_color:flags2.8?PeerColor emoji_status:flags2.9?EmojiStatus level:flags2.10?int = Chat;
channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat; channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
chatFull#c9d31138 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true translations_disabled:flags.19?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector<long> available_reactions:flags.18?ChatReactions = ChatFull; chatFull#c9d31138 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true translations_disabled:flags.19?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector<long> available_reactions:flags.18?ChatReactions = ChatFull;
channelFull#723027bd flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions stories:flags2.4?PeerStories = ChatFull; channelFull#44c054a7 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet = ChatFull;
chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant; chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant; chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
@ -135,7 +135,7 @@ chatPhotoEmpty#37c1011c = ChatPhoto;
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto; chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message; messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
message#38116ee0 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true id:int from_id:flags.8?Peer peer_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int = Message; message#1e4c8a69 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int = Message;
messageService#2b085862 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction ttl_period:flags.25?int = Message; messageService#2b085862 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction ttl_period:flags.25?int = Message;
messageMediaEmpty#3ded6320 = MessageMedia; messageMediaEmpty#3ded6320 = MessageMedia;
@ -143,7 +143,7 @@ messageMediaPhoto#695150d7 flags:# spoiler:flags.3?true photo:flags.0?Photo ttl_
messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia; messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia;
messageMediaContact#70322949 phone_number:string first_name:string last_name:string vcard:string user_id:long = MessageMedia; messageMediaContact#70322949 phone_number:string first_name:string last_name:string vcard:string user_id:long = MessageMedia;
messageMediaUnsupported#9f84f49e = MessageMedia; messageMediaUnsupported#9f84f49e = MessageMedia;
messageMediaDocument#4cf4d72d flags:# nopremium:flags.3?true spoiler:flags.4?true document:flags.0?Document alt_document:flags.5?Document ttl_seconds:flags.2?int = MessageMedia; messageMediaDocument#4cf4d72d flags:# nopremium:flags.3?true spoiler:flags.4?true video:flags.6?true round:flags.7?true voice:flags.8?true document:flags.0?Document alt_document:flags.5?Document ttl_seconds:flags.2?int = MessageMedia;
messageMediaWebPage#ddf10c3b flags:# force_large_media:flags.0?true force_small_media:flags.1?true manual:flags.3?true safe:flags.4?true webpage:WebPage = MessageMedia; messageMediaWebPage#ddf10c3b flags:# force_large_media:flags.0?true force_small_media:flags.1?true manual:flags.3?true safe:flags.4?true webpage:WebPage = MessageMedia;
messageMediaVenue#2ec0533f geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string = MessageMedia; messageMediaVenue#2ec0533f geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string = MessageMedia;
messageMediaGame#fdb19008 game:Game = MessageMedia; messageMediaGame#fdb19008 game:Game = MessageMedia;
@ -152,7 +152,8 @@ messageMediaGeoLive#b940c666 flags:# geo:GeoPoint heading:flags.0?int period:int
messageMediaPoll#4bd6e798 poll:Poll results:PollResults = MessageMedia; messageMediaPoll#4bd6e798 poll:Poll results:PollResults = MessageMedia;
messageMediaDice#3f7ee58b value:int emoticon:string = MessageMedia; messageMediaDice#3f7ee58b value:int emoticon:string = MessageMedia;
messageMediaStory#68cb6283 flags:# via_mention:flags.1?true peer:Peer id:int story:flags.0?StoryItem = MessageMedia; messageMediaStory#68cb6283 flags:# via_mention:flags.1?true peer:Peer id:int story:flags.0?StoryItem = MessageMedia;
messageMediaGiveaway#58260664 flags:# only_new_subscribers:flags.0?true channels:Vector<long> countries_iso2:flags.1?Vector<string> quantity:int months:int until_date:int = MessageMedia; messageMediaGiveaway#daad85b0 flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.2?true channels:Vector<long> countries_iso2:flags.1?Vector<string> prize_description:flags.3?string quantity:int months:int until_date:int = MessageMedia;
messageMediaGiveawayResults#c6991068 flags:# only_new_subscribers:flags.0?true refunded:flags.2?true channel_id:long additional_peers_count:flags.3?int launch_msg_id:int winners_count:int unclaimed_count:int winners:Vector<long> months:int prize_description:flags.1?string until_date:int = MessageMedia;
messageActionEmpty#b6aef7b0 = MessageAction; messageActionEmpty#b6aef7b0 = MessageAction;
messageActionChatCreate#bd47cbad title:string users:Vector<long> = MessageAction; messageActionChatCreate#bd47cbad title:string users:Vector<long> = MessageAction;
@ -190,13 +191,14 @@ messageActionGiftPremium#c83d6aec flags:# currency:string amount:long months:int
messageActionTopicCreate#d999256 flags:# title:string icon_color:int icon_emoji_id:flags.0?long = MessageAction; messageActionTopicCreate#d999256 flags:# 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#fe77345d button_id:int peer:Peer = MessageAction; messageActionRequestedPeer#31518e9b button_id:int peers:Vector<Peer> = MessageAction;
messageActionSetChatWallPaper#bc44a927 wallpaper:WallPaper = MessageAction; messageActionSetChatWallPaper#5060a3f4 flags:# same:flags.0?true for_both:flags.1?true wallpaper:WallPaper = MessageAction;
messageActionSetSameChatWallPaper#c0787d6d wallpaper:WallPaper = MessageAction; messageActionGiftCode#678c2e09 flags:# via_giveaway:flags.0?true unclaimed:flags.2?true boost_peer:flags.1?Peer months:int slug:string currency:flags.2?string amount:flags.2?long crypto_currency:flags.3?string crypto_amount:flags.3?long = MessageAction;
messageActionGiftCode#d2cfdb0e flags:# via_giveaway:flags.0?true unclaimed:flags.2?true boost_peer:flags.1?Peer months:int slug:string = MessageAction;
messageActionGiveawayLaunch#332ba9ed = MessageAction; messageActionGiveawayLaunch#332ba9ed = MessageAction;
messageActionGiveawayResults#2a9fadc5 winners_count:int unclaimed_count:int = MessageAction;
messageActionBoostApply#cc02aa6d boosts:int = MessageAction;
dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int 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;
@ -246,7 +248,7 @@ inputReportReasonFake#f5ddd6e7 = ReportReason;
inputReportReasonIllegalDrugs#a8eb2be = ReportReason; inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason; inputReportReasonPersonalDetails#9ec7863d = ReportReason;
userFull#b9b12c6c 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 id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights premium_gifts:flags.19?Vector<PremiumGiftOption> wallpaper:flags.24?WallPaper stories:flags.25?PeerStories = UserFull; userFull#b9b12c6c 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 id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights premium_gifts:flags.19?Vector<PremiumGiftOption> wallpaper:flags.24?WallPaper stories:flags.25?PeerStories = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact; contact#145ade0b user_id:long mutual:Bool = Contact;
@ -414,6 +416,13 @@ updateStoryID#1bf335b9 id:int random_id:long = Update;
updateStoriesStealthMode#2c084dc1 stealth_mode:StoriesStealthMode = Update; updateStoriesStealthMode#2c084dc1 stealth_mode:StoriesStealthMode = Update;
updateSentStoryReaction#7d627683 peer:Peer story_id:int reaction:Reaction = Update; updateSentStoryReaction#7d627683 peer:Peer story_id:int reaction:Reaction = Update;
updateBotChatBoost#904dd49c peer:Peer boost:Boost qts:int = Update; updateBotChatBoost#904dd49c peer:Peer boost:Boost qts:int = Update;
updateChannelViewForumAsMessages#7b68920 channel_id:long enabled:Bool = Update;
updatePeerWallpaper#ae3f101d flags:# wallpaper_overridden:flags.1?true peer:Peer wallpaper:flags.0?WallPaper = Update;
updateBotMessageReaction#ac21d3ce peer:Peer msg_id:int date:int actor:Peer old_reactions:Vector<Reaction> new_reactions:Vector<Reaction> qts:int = Update;
updateBotMessageReactions#9cb7759 peer:Peer msg_id:int date:int reactions:Vector<ReactionCount> qts:int = Update;
updateSavedDialogPinned#aeaf9e74 flags:# pinned:flags.0?true peer:DialogPeer = Update;
updatePinnedSavedDialogs#686c85a6 flags:# order:flags.0?Vector<DialogPeer> = Update;
updateSavedReactionTags#39c67432 = 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;
@ -610,8 +619,9 @@ inputStickerSetPremiumGifts#c88b3b02 = InputStickerSet;
inputStickerSetEmojiGenericAnimations#4c4d4ce = InputStickerSet; inputStickerSetEmojiGenericAnimations#4c4d4ce = InputStickerSet;
inputStickerSetEmojiDefaultStatuses#29d0f5ee = InputStickerSet; inputStickerSetEmojiDefaultStatuses#29d0f5ee = InputStickerSet;
inputStickerSetEmojiDefaultTopicIcons#44c1f8e9 = InputStickerSet; inputStickerSetEmojiDefaultTopicIcons#44c1f8e9 = InputStickerSet;
inputStickerSetEmojiChannelDefaultStatuses#49748553 = InputStickerSet;
stickerSet#2dd14edc flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true videos:flags.6?true emojis:flags.7?true text_color:flags.9?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int thumb_document_id:flags.8?long count:int hash:int = StickerSet; stickerSet#2dd14edc flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true videos:flags.6?true emojis:flags.7?true text_color:flags.9?true channel_emoji_status:flags.10?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int thumb_document_id:flags.8?long count:int hash:int = StickerSet;
messages.stickerSet#6e153f16 set:StickerSet packs:Vector<StickerPack> keywords:Vector<StickerKeyword> documents:Vector<Document> = messages.StickerSet; messages.stickerSet#6e153f16 set:StickerSet packs:Vector<StickerPack> keywords:Vector<StickerKeyword> documents:Vector<Document> = messages.StickerSet;
messages.stickerSetNotModified#d3f924eb = messages.StickerSet; messages.stickerSetNotModified#d3f924eb = messages.StickerSet;
@ -635,7 +645,7 @@ inputKeyboardButtonUserProfile#e988037b text:string user_id:InputUser = Keyboard
keyboardButtonUserProfile#308660c1 text:string user_id:long = KeyboardButton; keyboardButtonUserProfile#308660c1 text:string user_id:long = KeyboardButton;
keyboardButtonWebView#13767230 text:string url:string = KeyboardButton; keyboardButtonWebView#13767230 text:string url:string = KeyboardButton;
keyboardButtonSimpleWebView#a0c0505c text:string url:string = KeyboardButton; keyboardButtonSimpleWebView#a0c0505c text:string url:string = KeyboardButton;
keyboardButtonRequestPeer#d0b468c text:string button_id:int peer_type:RequestPeerType = KeyboardButton; keyboardButtonRequestPeer#53d7bfd8 text:string button_id:int peer_type:RequestPeerType max_quantity:int = KeyboardButton;
keyboardButtonRow#77608b83 buttons:Vector<KeyboardButton> = KeyboardButtonRow; keyboardButtonRow#77608b83 buttons:Vector<KeyboardButton> = KeyboardButtonRow;
@ -736,7 +746,7 @@ messages.botResults#e021f2f6 flags:# gallery:flags.0?true query_id:long next_off
exportedMessageLink#5dab1af4 link:string html:string = ExportedMessageLink; exportedMessageLink#5dab1af4 link:string html:string = ExportedMessageLink;
messageFwdHeader#5f777dce flags:# imported:flags.7?true from_id:flags.0?Peer from_name:flags.5?string date:int channel_post:flags.2?int post_author:flags.3?string saved_from_peer:flags.4?Peer saved_from_msg_id:flags.4?int psa_type:flags.6?string = MessageFwdHeader; messageFwdHeader#4e4df4bb flags:# imported:flags.7?true saved_out:flags.11?true from_id:flags.0?Peer from_name:flags.5?string date:int channel_post:flags.2?int post_author:flags.3?string saved_from_peer:flags.4?Peer saved_from_msg_id:flags.4?int saved_from_id:flags.8?Peer saved_from_name:flags.9?string saved_date:flags.10?int psa_type:flags.6?string = MessageFwdHeader;
auth.codeTypeSms#72a3158c = auth.CodeType; auth.codeTypeSms#72a3158c = auth.CodeType;
auth.codeTypeCall#741cd3e3 = auth.CodeType; auth.codeTypeCall#741cd3e3 = auth.CodeType;
@ -988,8 +998,11 @@ channelAdminLogEventActionEditTopic#f06fe208 prev_topic:ForumTopic new_topic:For
channelAdminLogEventActionDeleteTopic#ae168909 topic:ForumTopic = ChannelAdminLogEventAction; channelAdminLogEventActionDeleteTopic#ae168909 topic:ForumTopic = ChannelAdminLogEventAction;
channelAdminLogEventActionPinTopic#5d8d353b flags:# prev_topic:flags.0?ForumTopic new_topic:flags.1?ForumTopic = ChannelAdminLogEventAction; channelAdminLogEventActionPinTopic#5d8d353b flags:# prev_topic:flags.0?ForumTopic new_topic:flags.1?ForumTopic = ChannelAdminLogEventAction;
channelAdminLogEventActionToggleAntiSpam#64f36dfc new_value:Bool = ChannelAdminLogEventAction; channelAdminLogEventActionToggleAntiSpam#64f36dfc new_value:Bool = ChannelAdminLogEventAction;
channelAdminLogEventActionChangeColor#3c2b247b prev_value:int new_value:int = ChannelAdminLogEventAction; channelAdminLogEventActionChangePeerColor#5796e780 prev_value:PeerColor new_value:PeerColor = ChannelAdminLogEventAction;
channelAdminLogEventActionChangeBackgroundEmoji#445fc434 prev_value:long new_value:long = ChannelAdminLogEventAction; channelAdminLogEventActionChangeProfilePeerColor#5e477b25 prev_value:PeerColor new_value:PeerColor = ChannelAdminLogEventAction;
channelAdminLogEventActionChangeWallpaper#31bb5d52 prev_value:WallPaper new_value:WallPaper = ChannelAdminLogEventAction;
channelAdminLogEventActionChangeEmojiStatus#3ea9feb1 prev_value:EmojiStatus new_value:EmojiStatus = ChannelAdminLogEventAction;
channelAdminLogEventActionChangeEmojiStickerSet#46d840ab prev_stickerset:InputStickerSet new_stickerset:InputStickerSet = ChannelAdminLogEventAction;
channelAdminLogEvent#1fad68cd id:long date:int user_id:long action:ChannelAdminLogEventAction = ChannelAdminLogEvent; channelAdminLogEvent#1fad68cd id:long date:int user_id:long action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
@ -1166,7 +1179,7 @@ account.wallPapers#cdc3858c hash:long wallpapers:Vector<WallPaper> = account.Wal
codeSettings#ad253d78 flags:# allow_flashcall:flags.0?true current_number:flags.1?true allow_app_hash:flags.4?true allow_missed_call:flags.5?true allow_firebase:flags.7?true logout_tokens:flags.6?Vector<bytes> token:flags.8?string app_sandbox:flags.8?Bool = CodeSettings; codeSettings#ad253d78 flags:# allow_flashcall:flags.0?true current_number:flags.1?true allow_app_hash:flags.4?true allow_missed_call:flags.5?true allow_firebase:flags.7?true logout_tokens:flags.6?Vector<bytes> token:flags.8?string app_sandbox:flags.8?Bool = CodeSettings;
wallPaperSettings#1dc1bca4 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int second_background_color:flags.4?int third_background_color:flags.5?int fourth_background_color:flags.6?int intensity:flags.3?int rotation:flags.4?int = WallPaperSettings; wallPaperSettings#372efcd0 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int second_background_color:flags.4?int third_background_color:flags.5?int fourth_background_color:flags.6?int intensity:flags.3?int rotation:flags.4?int emoticon:flags.7?string = WallPaperSettings;
autoDownloadSettings#baa57628 flags:# disabled:flags.0?true video_preload_large:flags.1?true audio_preload_next:flags.2?true phonecalls_less_data:flags.3?true stories_preload:flags.4?true photo_size_max:int video_size_max:long file_size_max:long video_upload_maxbitrate:int small_queue_active_operations_max:int large_queue_active_operations_max:int = AutoDownloadSettings; autoDownloadSettings#baa57628 flags:# disabled:flags.0?true video_preload_large:flags.1?true audio_preload_next:flags.2?true phonecalls_less_data:flags.3?true stories_preload:flags.4?true photo_size_max:int video_size_max:long file_size_max:long video_upload_maxbitrate:int small_queue_active_operations_max:int large_queue_active_operations_max:int = AutoDownloadSettings;
@ -1252,9 +1265,7 @@ statsGraphAsync#4a27eb2d token:string = StatsGraph;
statsGraphError#bedc9822 error:string = StatsGraph; statsGraphError#bedc9822 error:string = StatsGraph;
statsGraph#8ea464b6 flags:# json:DataJSON zoom_token:flags.0?string = StatsGraph; statsGraph#8ea464b6 flags:# json:DataJSON zoom_token:flags.0?string = StatsGraph;
messageInteractionCounters#ad4fc9bd msg_id:int views:int forwards:int = MessageInteractionCounters; stats.broadcastStats#396ca5fc period:StatsDateRangeDays followers:StatsAbsValueAndPrev views_per_post:StatsAbsValueAndPrev shares_per_post:StatsAbsValueAndPrev reactions_per_post:StatsAbsValueAndPrev views_per_story:StatsAbsValueAndPrev shares_per_story:StatsAbsValueAndPrev reactions_per_story:StatsAbsValueAndPrev enabled_notifications:StatsPercentValue growth_graph:StatsGraph followers_graph:StatsGraph mute_graph:StatsGraph top_hours_graph:StatsGraph interactions_graph:StatsGraph iv_interactions_graph:StatsGraph views_by_source_graph:StatsGraph new_followers_by_source_graph:StatsGraph languages_graph:StatsGraph reactions_by_emotion_graph:StatsGraph story_interactions_graph:StatsGraph story_reactions_by_emotion_graph:StatsGraph recent_posts_interactions:Vector<PostInteractionCounters> = stats.BroadcastStats;
stats.broadcastStats#bdf78394 period:StatsDateRangeDays followers:StatsAbsValueAndPrev views_per_post:StatsAbsValueAndPrev shares_per_post:StatsAbsValueAndPrev enabled_notifications:StatsPercentValue growth_graph:StatsGraph followers_graph:StatsGraph mute_graph:StatsGraph top_hours_graph:StatsGraph interactions_graph:StatsGraph iv_interactions_graph:StatsGraph views_by_source_graph:StatsGraph new_followers_by_source_graph:StatsGraph languages_graph:StatsGraph recent_message_interactions:Vector<MessageInteractionCounters> = stats.BroadcastStats;
help.promoDataEmpty#98f6ac75 expires:int = help.PromoData; help.promoDataEmpty#98f6ac75 expires:int = help.PromoData;
help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer chats:Vector<Chat> users:Vector<User> psa_type:flags.1?string psa_message:flags.2?string = help.PromoData; help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer chats:Vector<Chat> users:Vector<User> psa_type:flags.1?string psa_message:flags.2?string = help.PromoData;
@ -1271,7 +1282,7 @@ statsGroupTopInviter#535f779d user_id:long invitations:int = StatsGroupTopInvite
stats.megagroupStats#ef7ff916 period:StatsDateRangeDays members:StatsAbsValueAndPrev messages:StatsAbsValueAndPrev viewers:StatsAbsValueAndPrev posters:StatsAbsValueAndPrev growth_graph:StatsGraph members_graph:StatsGraph new_members_by_source_graph:StatsGraph languages_graph:StatsGraph messages_graph:StatsGraph actions_graph:StatsGraph top_hours_graph:StatsGraph weekdays_graph:StatsGraph top_posters:Vector<StatsGroupTopPoster> top_admins:Vector<StatsGroupTopAdmin> top_inviters:Vector<StatsGroupTopInviter> users:Vector<User> = stats.MegagroupStats; stats.megagroupStats#ef7ff916 period:StatsDateRangeDays members:StatsAbsValueAndPrev messages:StatsAbsValueAndPrev viewers:StatsAbsValueAndPrev posters:StatsAbsValueAndPrev growth_graph:StatsGraph members_graph:StatsGraph new_members_by_source_graph:StatsGraph languages_graph:StatsGraph messages_graph:StatsGraph actions_graph:StatsGraph top_hours_graph:StatsGraph weekdays_graph:StatsGraph top_posters:Vector<StatsGroupTopPoster> top_admins:Vector<StatsGroupTopAdmin> top_inviters:Vector<StatsGroupTopInviter> users:Vector<User> = stats.MegagroupStats;
globalPrivacySettings#734c4ccb flags:# archive_and_mute_new_noncontact_peers:flags.0?true keep_archived_unmuted:flags.1?true keep_archived_folders:flags.2?true = GlobalPrivacySettings; globalPrivacySettings#734c4ccb flags:# archive_and_mute_new_noncontact_peers:flags.0?true keep_archived_unmuted:flags.1?true keep_archived_folders:flags.2?true hide_read_marks:flags.3?true new_noncontact_peers_require_premium:flags.4?true = GlobalPrivacySettings;
help.countryCode#4203c5ef flags:# country_code:string prefixes:flags.0?Vector<string> patterns:flags.1?Vector<string> = help.CountryCode; help.countryCode#4203c5ef flags:# country_code:string prefixes:flags.0?Vector<string> patterns:flags.1?Vector<string> = help.CountryCode;
@ -1286,14 +1297,14 @@ messages.messageViews#b6c4f543 views:Vector<MessageViews> chats:Vector<Chat> use
messages.discussionMessage#a6341782 flags:# messages:Vector<Message> max_id:flags.0?int read_inbox_max_id:flags.1?int read_outbox_max_id:flags.2?int unread_count:int chats:Vector<Chat> users:Vector<User> = messages.DiscussionMessage; messages.discussionMessage#a6341782 flags:# messages:Vector<Message> max_id:flags.0?int read_inbox_max_id:flags.1?int read_outbox_max_id:flags.2?int unread_count:int chats:Vector<Chat> users:Vector<User> = messages.DiscussionMessage;
messageReplyHeader#6eebcabd flags:# reply_to_scheduled:flags.2?true forum_topic:flags.3?true quote:flags.9?true reply_to_msg_id:flags.4?int reply_to_peer_id:flags.0?Peer reply_from:flags.5?MessageFwdHeader reply_media:flags.8?MessageMedia reply_to_top_id:flags.1?int quote_text:flags.6?string quote_entities:flags.7?Vector<MessageEntity> = MessageReplyHeader; messageReplyHeader#afbc09db flags:# reply_to_scheduled:flags.2?true forum_topic:flags.3?true quote:flags.9?true reply_to_msg_id:flags.4?int reply_to_peer_id:flags.0?Peer reply_from:flags.5?MessageFwdHeader reply_media:flags.8?MessageMedia reply_to_top_id:flags.1?int quote_text:flags.6?string quote_entities:flags.7?Vector<MessageEntity> quote_offset:flags.10?int = MessageReplyHeader;
messageReplyStoryHeader#9c98bfc1 user_id:long story_id:int = MessageReplyHeader; messageReplyStoryHeader#e5af939 peer:Peer story_id:int = MessageReplyHeader;
messageReplies#83d60fc2 flags:# comments:flags.0?true replies:int replies_pts:int recent_repliers:flags.1?Vector<Peer> channel_id:flags.0?long max_id:flags.2?int read_max_id:flags.3?int = MessageReplies; messageReplies#83d60fc2 flags:# comments:flags.0?true replies:int replies_pts:int recent_repliers:flags.1?Vector<Peer> channel_id:flags.0?long max_id:flags.2?int read_max_id:flags.3?int = MessageReplies;
peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked; peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked;
stats.messageStats#8999f295 views_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#d597650c 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 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 = GroupCall; groupCall#d597650c 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 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 = GroupCall;
@ -1356,7 +1367,7 @@ 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;
sponsoredMessage#daafff6b flags:# recommended:flags.5?true show_peer_photo:flags.6?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string webpage:flags.9?SponsoredWebPage message:string entities:flags.1?Vector<MessageEntity> sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage; sponsoredMessage#ed5383f7 flags:# recommended:flags.5?true show_peer_photo:flags.6?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string webpage:flags.9?SponsoredWebPage app:flags.10?BotApp message:string entities:flags.1?Vector<MessageEntity> button_text:flags.11?string sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage;
messages.sponsoredMessages#c9ee1d87 flags:# posts_between:flags.0?int messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages; messages.sponsoredMessages#c9ee1d87 flags:# posts_between:flags.0?int messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages;
messages.sponsoredMessagesEmpty#1839490f = messages.SponsoredMessages; messages.sponsoredMessagesEmpty#1839490f = messages.SponsoredMessages;
@ -1379,7 +1390,7 @@ auth.loggedOut#c3a2835f flags:# future_auth_token:flags.0?bytes = auth.LoggedOut
reactionCount#a3d1cb80 flags:# chosen_order:flags.0?int reaction:Reaction count:int = ReactionCount; reactionCount#a3d1cb80 flags:# chosen_order:flags.0?int reaction:Reaction count:int = ReactionCount;
messageReactions#4f2b9479 flags:# min:flags.0?true can_see_list:flags.2?true results:Vector<ReactionCount> recent_reactions:flags.1?Vector<MessagePeerReaction> = MessageReactions; messageReactions#4f2b9479 flags:# min:flags.0?true can_see_list:flags.2?true reactions_as_tags:flags.3?true results:Vector<ReactionCount> recent_reactions:flags.1?Vector<MessagePeerReaction> = MessageReactions;
messages.messageReactionsList#31bd492d flags:# count:int reactions:Vector<MessagePeerReaction> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = messages.MessageReactionsList; messages.messageReactionsList#31bd492d flags:# count:int reactions:Vector<MessagePeerReaction> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = messages.MessageReactionsList;
@ -1440,14 +1451,14 @@ inputInvoicePremiumGiftCode#98986c0d purpose:InputStorePaymentPurpose option:Pre
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice; payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
messages.transcribedAudio#93752c52 flags:# pending:flags.0?true transcription_id:long text:string = 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;
inputStorePaymentPremiumSubscription#a6751e66 flags:# restore:flags.0?true upgrade:flags.1?true = InputStorePaymentPurpose; inputStorePaymentPremiumSubscription#a6751e66 flags:# restore:flags.0?true upgrade:flags.1?true = InputStorePaymentPurpose;
inputStorePaymentGiftPremium#616f7fe8 user_id:InputUser currency:string amount:long = InputStorePaymentPurpose; inputStorePaymentGiftPremium#616f7fe8 user_id:InputUser currency:string amount:long = InputStorePaymentPurpose;
inputStorePaymentPremiumGiftCode#a3805f3f flags:# users:Vector<InputUser> boost_peer:flags.0?InputPeer currency:string amount:long = InputStorePaymentPurpose; inputStorePaymentPremiumGiftCode#a3805f3f flags:# users:Vector<InputUser> boost_peer:flags.0?InputPeer currency:string amount:long = InputStorePaymentPurpose;
inputStorePaymentPremiumGiveaway#7c9375e6 flags:# only_new_subscribers:flags.0?true boost_peer:InputPeer additional_peers:flags.1?Vector<InputPeer> countries_iso2:flags.2?Vector<string> random_id:long until_date:int currency:string amount:long = InputStorePaymentPurpose; inputStorePaymentPremiumGiveaway#160544ca flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true boost_peer:InputPeer additional_peers:flags.1?Vector<InputPeer> countries_iso2:flags.2?Vector<string> prize_description:flags.4?string random_id:long until_date:int currency:string amount:long = InputStorePaymentPurpose;
premiumGiftOption#74c34319 flags:# months:int currency:string amount:long bot_url:string store_product:flags.0?string = PremiumGiftOption; premiumGiftOption#74c34319 flags:# months:int currency:string amount:long bot_url:string store_product:flags.0?string = PremiumGiftOption;
@ -1566,7 +1577,7 @@ storyViews#8d595cd6 flags:# has_viewers:flags.1?true views_count:int forwards_co
storyItemDeleted#51e6ee4f id:int = StoryItem; storyItemDeleted#51e6ee4f id:int = StoryItem;
storyItemSkipped#ffadc913 flags:# close_friends:flags.8?true id:int date:int expire_date:int = StoryItem; storyItemSkipped#ffadc913 flags:# close_friends:flags.8?true id:int date:int expire_date:int = StoryItem;
storyItem#44c457ce flags:# pinned:flags.5?true public:flags.7?true close_friends:flags.8?true min:flags.9?true noforwards:flags.10?true edited:flags.11?true contacts:flags.12?true selected_contacts:flags.13?true out:flags.16?true id:int date:int expire_date:int caption:flags.0?string entities:flags.1?Vector<MessageEntity> media:MessageMedia media_areas:flags.14?Vector<MediaArea> privacy:flags.2?Vector<PrivacyRule> views:flags.3?StoryViews sent_reaction:flags.15?Reaction = StoryItem; storyItem#79b26a24 flags:# pinned:flags.5?true public:flags.7?true close_friends:flags.8?true min:flags.9?true noforwards:flags.10?true edited:flags.11?true contacts:flags.12?true selected_contacts:flags.13?true out:flags.16?true id:int date:int from_id:flags.18?Peer fwd_from:flags.17?StoryFwdHeader expire_date:int caption:flags.0?string entities:flags.1?Vector<MessageEntity> media:MessageMedia media_areas:flags.14?Vector<MediaArea> privacy:flags.2?Vector<PrivacyRule> views:flags.3?StoryViews sent_reaction:flags.15?Reaction = StoryItem;
stories.allStoriesNotModified#1158fe3e flags:# state:string stealth_mode:StoriesStealthMode = stories.AllStories; stories.allStoriesNotModified#1158fe3e flags:# state:string stealth_mode:StoriesStealthMode = stories.AllStories;
stories.allStories#6efc5e81 flags:# has_more:flags.0?true count:int state:string peer_stories:Vector<PeerStories> chats:Vector<Chat> users:Vector<User> stealth_mode:StoriesStealthMode = stories.AllStories; stories.allStories#6efc5e81 flags:# has_more:flags.0?true count:int state:string peer_stories:Vector<PeerStories> chats:Vector<Chat> users:Vector<User> stealth_mode:StoriesStealthMode = stories.AllStories;
@ -1574,13 +1585,15 @@ stories.allStories#6efc5e81 flags:# has_more:flags.0?true count:int state:string
stories.stories#5dd8c3c8 count:int stories:Vector<StoryItem> chats:Vector<Chat> users:Vector<User> = stories.Stories; stories.stories#5dd8c3c8 count:int stories:Vector<StoryItem> chats:Vector<Chat> users:Vector<User> = stories.Stories;
storyView#b0bdeac5 flags:# blocked:flags.0?true blocked_my_stories_from:flags.1?true user_id:long date:int reaction:flags.2?Reaction = StoryView; storyView#b0bdeac5 flags:# blocked:flags.0?true blocked_my_stories_from:flags.1?true user_id:long date:int reaction:flags.2?Reaction = StoryView;
storyViewPublicForward#9083670b flags:# blocked:flags.0?true blocked_my_stories_from:flags.1?true message:Message = StoryView;
storyViewPublicRepost#bd74cf49 flags:# blocked:flags.0?true blocked_my_stories_from:flags.1?true peer_id:Peer story:StoryItem = StoryView;
stories.storyViewsList#46e9b9ec flags:# count:int reactions_count:int views:Vector<StoryView> users:Vector<User> next_offset:flags.0?string = stories.StoryViewsList; stories.storyViewsList#59d78fc5 flags:# count:int views_count:int forwards_count:int reactions_count:int views:Vector<StoryView> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = stories.StoryViewsList;
stories.storyViews#de9eed1d views:Vector<StoryViews> users:Vector<User> = stories.StoryViews; stories.storyViews#de9eed1d views:Vector<StoryViews> users:Vector<User> = stories.StoryViews;
inputReplyToMessage#73ec805 flags:# reply_to_msg_id:int top_msg_id:flags.0?int reply_to_peer_id:flags.1?InputPeer quote_text:flags.2?string quote_entities:flags.3?Vector<MessageEntity> = InputReplyTo; inputReplyToMessage#22c0f6d5 flags:# reply_to_msg_id:int top_msg_id:flags.0?int reply_to_peer_id:flags.1?InputPeer quote_text:flags.2?string quote_entities:flags.3?Vector<MessageEntity> quote_offset:flags.4?int = InputReplyTo;
inputReplyToStory#15b0f283 user_id:InputUser story_id:int = InputReplyTo; inputReplyToStory#5881323a peer:InputPeer story_id:int = InputReplyTo;
exportedStoryLink#3fc9053b link:string = ExportedStoryLink; exportedStoryLink#3fc9053b link:string = ExportedStoryLink;
@ -1592,6 +1605,8 @@ mediaAreaVenue#be82db9c coordinates:MediaAreaCoordinates geo:GeoPoint title:stri
inputMediaAreaVenue#b282217f coordinates:MediaAreaCoordinates query_id:long result_id:string = MediaArea; inputMediaAreaVenue#b282217f coordinates:MediaAreaCoordinates query_id:long result_id:string = MediaArea;
mediaAreaGeoPoint#df8b3b22 coordinates:MediaAreaCoordinates geo:GeoPoint = MediaArea; mediaAreaGeoPoint#df8b3b22 coordinates:MediaAreaCoordinates geo:GeoPoint = MediaArea;
mediaAreaSuggestedReaction#14455871 flags:# dark:flags.0?true flipped:flags.1?true coordinates:MediaAreaCoordinates reaction:Reaction = MediaArea; mediaAreaSuggestedReaction#14455871 flags:# dark:flags.0?true flipped:flags.1?true coordinates:MediaAreaCoordinates reaction:Reaction = MediaArea;
mediaAreaChannelPost#770416af coordinates:MediaAreaCoordinates channel_id:long msg_id:int = MediaArea;
inputMediaAreaChannelPost#2271f2bf coordinates:MediaAreaCoordinates channel:InputChannel msg_id:int = MediaArea;
peerStories#9a35e999 flags:# peer:Peer max_read_id:flags.0?int stories:Vector<StoryItem> = PeerStories; peerStories#9a35e999 flags:# peer:Peer max_read_id:flags.0?int stories:Vector<StoryItem> = PeerStories;
@ -1601,7 +1616,7 @@ messages.webPage#fd5e12bd webpage:WebPage chats:Vector<Chat> users:Vector<User>
premiumGiftCodeOption#257e962b flags:# users:int months:int store_product:flags.0?string store_quantity:flags.1?int currency:string amount:long = PremiumGiftCodeOption; premiumGiftCodeOption#257e962b flags:# users:int months:int store_product:flags.0?string store_quantity:flags.1?int currency:string amount:long = PremiumGiftCodeOption;
payments.checkedGiftCode#b722f158 flags:# via_giveaway:flags.2?true from_id:Peer giveaway_msg_id:flags.3?int to_id:flags.0?long date:int months:int used_date:flags.1?int chats:Vector<Chat> users:Vector<User> = payments.CheckedGiftCode; payments.checkedGiftCode#284a1096 flags:# via_giveaway:flags.2?true from_id:flags.4?Peer giveaway_msg_id:flags.3?int to_id:flags.0?long date:int months:int used_date:flags.1?int chats:Vector<Chat> users:Vector<User> = payments.CheckedGiftCode;
payments.giveawayInfo#4367daa0 flags:# participating:flags.0?true preparing_results:flags.3?true start_date:int joined_too_early_date:flags.1?int admin_disallowed_chat_id:flags.2?long disallowed_country:flags.4?string = payments.GiveawayInfo; payments.giveawayInfo#4367daa0 flags:# participating:flags.0?true preparing_results:flags.3?true start_date:int joined_too_early_date:flags.1?int admin_disallowed_chat_id:flags.2?long disallowed_country:flags.4?string = payments.GiveawayInfo;
payments.giveawayInfoResults#cd5570 flags:# winner:flags.0?true refunded:flags.1?true start_date:int gift_code_slug:flags.0?string finish_date:int winners_count:int activated_count:int = payments.GiveawayInfo; payments.giveawayInfoResults#cd5570 flags:# winner:flags.0?true refunded:flags.1?true start_date:int gift_code_slug:flags.0?string finish_date:int winners_count:int activated_count:int = payments.GiveawayInfo;
@ -1618,6 +1633,47 @@ premium.myBoosts#9ae228e2 my_boosts:Vector<MyBoost> chats:Vector<Chat> users:Vec
premium.boostsStatus#4959427a flags:# my_boost:flags.2?true level:int current_level_boosts:int boosts:int gift_boosts:flags.4?int next_level_boosts:flags.0?int premium_audience:flags.1?StatsPercentValue boost_url:string prepaid_giveaways:flags.3?Vector<PrepaidGiveaway> my_boost_slots:flags.2?Vector<int> = premium.BoostsStatus; premium.boostsStatus#4959427a flags:# my_boost:flags.2?true level:int current_level_boosts:int boosts:int gift_boosts:flags.4?int next_level_boosts:flags.0?int premium_audience:flags.1?StatsPercentValue boost_url:string prepaid_giveaways:flags.3?Vector<PrepaidGiveaway> my_boost_slots:flags.2?Vector<int> = premium.BoostsStatus;
storyFwdHeader#b826e150 flags:# modified:flags.3?true from:flags.0?Peer from_name:flags.1?string story_id:flags.2?int = StoryFwdHeader;
postInteractionCountersMessage#e7058e7f msg_id:int views:int forwards:int reactions:int = PostInteractionCounters;
postInteractionCountersStory#8a480e27 story_id:int views:int forwards:int reactions:int = PostInteractionCounters;
stats.storyStats#50cd067c views_graph:StatsGraph reactions_by_emotion_graph:StatsGraph = stats.StoryStats;
publicForwardMessage#1f2bf4a message:Message = 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;
peerColor#b54b5acf flags:# color:flags.0?int background_emoji_id:flags.1?long = PeerColor;
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.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.peerColorsNotModified#2ba1f5ce = help.PeerColors;
help.peerColors#f8ed08 hash:int colors:Vector<help.PeerColorOption> = help.PeerColors;
storyReaction#6090d6d5 peer_id:Peer date:int reaction:Reaction = StoryReaction;
storyReactionPublicForward#bbab2643 message:Message = StoryReaction;
storyReactionPublicRepost#cfcd0f13 peer_id:Peer story:StoryItem = StoryReaction;
stories.storyReactionsList#aa5f789c flags:# count:int reactions:Vector<StoryReaction> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = stories.StoryReactionsList;
savedDialog#bd87cb6c flags:# pinned:flags.2?true peer:Peer top_message:int = SavedDialog;
messages.savedDialogs#f83ae221 dialogs:Vector<SavedDialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.SavedDialogs;
messages.savedDialogsSlice#44ba9dd9 count:int dialogs:Vector<SavedDialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.SavedDialogs;
messages.savedDialogsNotModified#c01f6fe8 count:int = messages.SavedDialogs;
savedReactionTag#cb6ff828 flags:# reaction:Reaction title:flags.0?string count:int = SavedReactionTag;
messages.savedReactionTagsNotModified#889b59ef = messages.SavedReactionTags;
messages.savedReactionTags#3259950a tags:Vector<SavedReactionTag> hash:long = messages.SavedReactionTags;
outboxReadDate#3bb842ac date:int = OutboxReadDate;
---functions--- ---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@ -1629,7 +1685,7 @@ invokeWithMessagesRange#365275f2 {X:Type} range:MessageRange query:!X = X;
invokeWithTakeout#aca9fd2e {X:Type} takeout_id:long query:!X = X; invokeWithTakeout#aca9fd2e {X:Type} takeout_id:long query:!X = X;
auth.sendCode#a677244f phone_number:string api_id:int api_hash:string settings:CodeSettings = auth.SentCode; auth.sendCode#a677244f phone_number:string api_id:int api_hash:string settings:CodeSettings = auth.SentCode;
auth.signUp#80eee427 phone_number:string phone_code_hash:string first_name:string last_name:string = auth.Authorization; auth.signUp#aac7b717 flags:# no_joined_notifications:flags.0?true phone_number:string phone_code_hash:string first_name:string last_name:string = auth.Authorization;
auth.signIn#8d52a951 flags:# phone_number:string phone_code_hash:string phone_code:flags.0?string email_verification:flags.1?EmailVerification = auth.Authorization; auth.signIn#8d52a951 flags:# phone_number:string phone_code_hash:string phone_code:flags.0?string email_verification:flags.1?EmailVerification = auth.Authorization;
auth.logOut#3e72ba19 = auth.LoggedOut; auth.logOut#3e72ba19 = auth.LoggedOut;
auth.resetAuthorizations#9fab0d1a = Bool; auth.resetAuthorizations#9fab0d1a = Bool;
@ -1739,12 +1795,15 @@ 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#a001cc43 flags:# color:int background_emoji_id:flags.0?long = Bool; account.updateColor#7cefa15d flags:# for_profile:flags.1?true color:flags.2?int background_emoji_id:flags.0?long = Bool;
account.getDefaultBackgroundEmojis#a60ab9ce hash:long = EmojiList; account.getDefaultBackgroundEmojis#a60ab9ce hash:long = EmojiList;
account.getChannelDefaultEmojiStatuses#7727a7d5 hash:long = account.EmojiStatuses;
account.getChannelRestrictedStatusEmojis#35a9e0d5 hash:long = EmojiList;
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;
users.setSecureValueErrors#90c894b5 id:InputUser errors:Vector<SecureValueError> = Bool; users.setSecureValueErrors#90c894b5 id:InputUser errors:Vector<SecureValueError> = Bool;
users.getIsPremiumRequiredToContact#a622aa10 id:Vector<InputUser> = Vector<Bool>;
contacts.getContactIDs#7adc669d hash:long = Vector<int>; contacts.getContactIDs#7adc669d hash:long = Vector<int>;
contacts.getStatuses#c4a353ee = Vector<ContactStatus>; contacts.getStatuses#c4a353ee = Vector<ContactStatus>;
@ -1775,7 +1834,7 @@ contacts.setBlocked#94c65c76 flags:# my_stories_from:flags.0?true id:Vector<Inpu
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;
messages.getHistory#4423e6c5 peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages; messages.getHistory#4423e6c5 peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages;
messages.search#a0fda762 flags:# peer:InputPeer q:string from_id:flags.0?InputPeer top_msg_id:flags.1?int filter:MessagesFilter min_date:int max_date:int offset_id:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages; messages.search#29ee847a flags:# peer:InputPeer q:string from_id:flags.0?InputPeer saved_peer_id:flags.2?InputPeer saved_reaction:flags.3?Vector<Reaction> top_msg_id:flags.1?int filter:MessagesFilter min_date:int max_date:int offset_id:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages;
messages.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages; messages.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages;
messages.deleteHistory#b08f922a flags:# just_clear:flags.0?true revoke:flags.1?true peer:InputPeer max_id:int min_date:flags.2?int max_date:flags.3?int = messages.AffectedHistory; messages.deleteHistory#b08f922a flags:# just_clear:flags.0?true revoke:flags.1?true peer:InputPeer max_id:int min_date:flags.2?int max_date:flags.3?int = messages.AffectedHistory;
messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector<int> = messages.AffectedMessages; messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector<int> = messages.AffectedMessages;
@ -1878,7 +1937,7 @@ messages.getEmojiKeywords#35a0e062 lang_code:string = EmojiKeywordsDifference;
messages.getEmojiKeywordsDifference#1508b6af lang_code:string from_version:int = EmojiKeywordsDifference; messages.getEmojiKeywordsDifference#1508b6af lang_code:string from_version:int = EmojiKeywordsDifference;
messages.getEmojiKeywordsLanguages#4e9963b2 lang_codes:Vector<string> = Vector<EmojiLanguage>; messages.getEmojiKeywordsLanguages#4e9963b2 lang_codes:Vector<string> = Vector<EmojiLanguage>;
messages.getEmojiURL#d5b10c26 lang_code:string = EmojiURL; messages.getEmojiURL#d5b10c26 lang_code:string = EmojiURL;
messages.getSearchCounters#ae7cc1 flags:# peer:InputPeer top_msg_id:flags.0?int filters:Vector<MessagesFilter> = Vector<messages.SearchCounter>; messages.getSearchCounters#1bbcf300 flags:# peer:InputPeer saved_peer_id:flags.2?InputPeer top_msg_id:flags.0?int filters:Vector<MessagesFilter> = Vector<messages.SearchCounter>;
messages.requestUrlAuth#198fb446 flags:# peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string = UrlAuthResult; messages.requestUrlAuth#198fb446 flags:# peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string = UrlAuthResult;
messages.acceptUrlAuth#b12c7125 flags:# write_allowed:flags.0?true peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string = UrlAuthResult; messages.acceptUrlAuth#b12c7125 flags:# write_allowed:flags.0?true peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string = UrlAuthResult;
messages.hidePeerSettingsBar#4facb138 peer:InputPeer = Bool; messages.hidePeerSettingsBar#4facb138 peer:InputPeer = Bool;
@ -1914,8 +1973,8 @@ 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#e63be13f peer:InputPeer emoticon:string = Updates;
messages.getMessageReadParticipants#31c1c44f peer:InputPeer msg_id:int = Vector<ReadParticipantDate>; messages.getMessageReadParticipants#31c1c44f peer:InputPeer msg_id:int = Vector<ReadParticipantDate>;
messages.getSearchResultsCalendar#49f0bde9 peer: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#6e9583a3 peer: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;
messages.hideChatJoinRequest#7fe7e815 flags:# approved:flags.0?true peer:InputPeer user_id:InputUser = Updates; messages.hideChatJoinRequest#7fe7e815 flags:# approved:flags.0?true peer:InputPeer user_id:InputUser = Updates;
messages.hideAllChatJoinRequests#e085f4ea flags:# approved:flags.0?true peer:InputPeer link:flags.1?string = Updates; messages.hideAllChatJoinRequests#e085f4ea flags:# approved:flags.0?true peer:InputPeer link:flags.1?string = Updates;
messages.toggleNoForwards#b11eafa2 peer:InputPeer enabled:Bool = Updates; messages.toggleNoForwards#b11eafa2 peer:InputPeer enabled:Bool = Updates;
@ -1950,7 +2009,7 @@ messages.clearRecentReactions#9dfeefb4 = Bool;
messages.getExtendedMedia#84f80814 peer:InputPeer id:Vector<int> = Updates; messages.getExtendedMedia#84f80814 peer:InputPeer id:Vector<int> = Updates;
messages.setDefaultHistoryTTL#9eb51445 period:int = Bool; messages.setDefaultHistoryTTL#9eb51445 period:int = Bool;
messages.getDefaultHistoryTTL#658b7188 = DefaultHistoryTTL; messages.getDefaultHistoryTTL#658b7188 = DefaultHistoryTTL;
messages.sendBotRequestedPeer#fe38d01b peer:InputPeer msg_id:int button_id:int requested_peer:InputPeer = Updates; messages.sendBotRequestedPeer#91b2d060 peer:InputPeer msg_id:int button_id:int requested_peers:Vector<InputPeer> = Updates;
messages.getEmojiGroups#7488ce5b hash:int = messages.EmojiGroups; messages.getEmojiGroups#7488ce5b hash:int = messages.EmojiGroups;
messages.getEmojiStatusGroups#2ecd56cd hash:int = messages.EmojiGroups; messages.getEmojiStatusGroups#2ecd56cd hash:int = messages.EmojiGroups;
messages.getEmojiProfilePhotoGroups#21a548f3 hash:int = messages.EmojiGroups; messages.getEmojiProfilePhotoGroups#21a548f3 hash:int = messages.EmojiGroups;
@ -1958,7 +2017,18 @@ messages.searchCustomEmoji#2c11c0d7 emoticon:string hash:long = EmojiList;
messages.togglePeerTranslations#e47cb579 flags:# disabled:flags.0?true peer:InputPeer = Bool; messages.togglePeerTranslations#e47cb579 flags:# disabled:flags.0?true peer:InputPeer = Bool;
messages.getBotApp#34fdc5c3 app:InputBotApp hash:long = messages.BotApp; messages.getBotApp#34fdc5c3 app:InputBotApp hash:long = messages.BotApp;
messages.requestAppWebView#8c5a3b3c flags:# write_allowed:flags.0?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = AppWebViewResult; messages.requestAppWebView#8c5a3b3c flags:# write_allowed:flags.0?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = AppWebViewResult;
messages.setChatWallPaper#8ffacae1 flags:# peer:InputPeer wallpaper:flags.0?InputWallPaper settings:flags.2?WallPaperSettings id:flags.1?int = Updates; messages.setChatWallPaper#8ffacae1 flags:# for_both:flags.3?true revert:flags.4?true peer:InputPeer wallpaper:flags.0?InputWallPaper settings:flags.2?WallPaperSettings id:flags.1?int = Updates;
messages.searchEmojiStickerSets#92b4494c flags:# exclude_featured:flags.0?true q:string hash:long = messages.FoundStickerSets;
messages.getSavedDialogs#5381d21a flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:long = messages.SavedDialogs;
messages.getSavedHistory#3d9a414d peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages;
messages.deleteSavedHistory#6e98102b flags:# peer:InputPeer max_id:int min_date:flags.2?int max_date:flags.3?int = messages.AffectedHistory;
messages.getPinnedSavedDialogs#d63d94e0 = messages.SavedDialogs;
messages.toggleSavedDialogPin#ac81bbde flags:# pinned:flags.0?true peer:InputDialogPeer = Bool;
messages.reorderPinnedSavedDialogs#8b716587 flags:# force:flags.0?true order:Vector<InputDialogPeer> = Bool;
messages.getSavedReactionTags#3637e05b flags:# peer:flags.0?InputPeer hash:long = messages.SavedReactionTags;
messages.updateSavedReactionTag#60297dec flags:# reaction:Reaction title:flags.0?string = Bool;
messages.getDefaultTagReactions#bdf93428 hash:long = messages.Reactions;
messages.getOutboxReadDate#8c4bfe5d peer:InputPeer msg_id:int = OutboxReadDate;
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;
@ -1984,7 +2054,6 @@ help.getNearestDc#1fb33026 = NearestDc;
help.getAppUpdate#522d5a7d source:string = help.AppUpdate; help.getAppUpdate#522d5a7d source:string = help.AppUpdate;
help.getInviteText#4d392343 = help.InviteText; help.getInviteText#4d392343 = help.InviteText;
help.getSupport#9cdf08cd = help.Support; help.getSupport#9cdf08cd = help.Support;
help.getAppChangelog#9010ef6f prev_app_version:string = Updates;
help.setBotUpdatesStatus#ec22cfcd pending_updates_count:int message:string = Bool; help.setBotUpdatesStatus#ec22cfcd pending_updates_count:int message:string = Bool;
help.getCdnConfig#52029342 = CdnConfig; help.getCdnConfig#52029342 = CdnConfig;
help.getRecentMeUrls#3dc0f114 referer:string = help.RecentMeUrls; help.getRecentMeUrls#3dc0f114 referer:string = help.RecentMeUrls;
@ -2002,6 +2071,8 @@ help.hidePromoData#1e251c95 peer:InputPeer = Bool;
help.dismissSuggestion#f50dbaa1 peer:InputPeer suggestion:string = Bool; help.dismissSuggestion#f50dbaa1 peer:InputPeer suggestion:string = Bool;
help.getCountriesList#735787a8 lang_code:string hash:int = help.CountriesList; help.getCountriesList#735787a8 lang_code:string hash:int = help.CountriesList;
help.getPremiumPromo#b81b93d4 = help.PremiumPromo; help.getPremiumPromo#b81b93d4 = help.PremiumPromo;
help.getPeerColors#da80f42f hash:int = help.PeerColors;
help.getPeerProfileColors#abcfa9fd hash:int = help.PeerColors;
channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool; channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool;
channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector<int> = messages.AffectedMessages; channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector<int> = messages.AffectedMessages;
@ -2059,7 +2130,12 @@ 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;
channels.clickSponsoredMessage#18afbc93 channel:InputChannel random_id:bytes = Bool; channels.clickSponsoredMessage#18afbc93 channel:InputChannel random_id:bytes = Bool;
channels.updateColor#621a201f flags:# channel:InputChannel color:int background_emoji_id:flags.0?long = Updates; channels.updateColor#d8aa3671 flags:# for_profile:flags.1?true channel:InputChannel color:flags.2?int background_emoji_id:flags.0?long = Updates;
channels.toggleViewForumAsMessages#9738bb15 channel:InputChannel enabled:Bool = Updates;
channels.getChannelRecommendations#83b70d97 channel:InputChannel = messages.Chats;
channels.updateEmojiStatus#f0d3e6a8 channel:InputChannel emoji_status:EmojiStatus = Updates;
channels.setBoostsToUnblockRestrictions#ad399cee channel:InputChannel boosts:int = Updates;
channels.setEmojiStickers#3cd930b7 channel:InputChannel stickerset:InputStickerSet = Bool;
bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON; bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON;
bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool; bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool;
@ -2149,8 +2225,10 @@ folders.editPeerFolders#6847d0ab folder_peers:Vector<InputFolderPeer> = Updates;
stats.getBroadcastStats#ab42441a flags:# dark:flags.0?true channel:InputChannel = stats.BroadcastStats; stats.getBroadcastStats#ab42441a flags:# dark:flags.0?true channel:InputChannel = stats.BroadcastStats;
stats.loadAsyncGraph#621d5fa0 flags:# token:string x:flags.0?long = StatsGraph; stats.loadAsyncGraph#621d5fa0 flags:# token:string x:flags.0?long = StatsGraph;
stats.getMegagroupStats#dcdf8607 flags:# dark:flags.0?true channel:InputChannel = stats.MegagroupStats; stats.getMegagroupStats#dcdf8607 flags:# dark:flags.0?true channel:InputChannel = stats.MegagroupStats;
stats.getMessagePublicForwards#5630281b channel:InputChannel msg_id:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages; stats.getMessagePublicForwards#5f150144 channel:InputChannel msg_id:int offset:string limit:int = stats.PublicForwards;
stats.getMessageStats#b6e0a3f5 flags:# dark:flags.0?true channel:InputChannel msg_id:int = stats.MessageStats; stats.getMessageStats#b6e0a3f5 flags:# dark:flags.0?true channel:InputChannel msg_id:int = stats.MessageStats;
stats.getStoryStats#374fef40 flags:# dark:flags.0?true peer:InputPeer id:int = stats.StoryStats;
stats.getStoryPublicForwards#a6437ef6 peer:InputPeer id:int offset:string limit:int = stats.PublicForwards;
chatlists.exportChatlistInvite#8472478e chatlist:InputChatlist title:string peers:Vector<InputPeer> = chatlists.ExportedChatlistInvite; chatlists.exportChatlistInvite#8472478e chatlist:InputChatlist title:string peers:Vector<InputPeer> = chatlists.ExportedChatlistInvite;
chatlists.deleteExportedInvite#719c5c5e chatlist:InputChatlist slug:string = Bool; chatlists.deleteExportedInvite#719c5c5e chatlist:InputChatlist slug:string = Bool;
@ -2165,7 +2243,7 @@ chatlists.getLeaveChatlistSuggestions#fdbcd714 chatlist:InputChatlist = Vector<P
chatlists.leaveChatlist#74fae13a chatlist:InputChatlist peers:Vector<InputPeer> = Updates; chatlists.leaveChatlist#74fae13a chatlist:InputChatlist peers:Vector<InputPeer> = Updates;
stories.canSendStory#c7dfdfdd peer:InputPeer = Bool; stories.canSendStory#c7dfdfdd peer:InputPeer = Bool;
stories.sendStory#bcb73644 flags:# pinned:flags.2?true noforwards:flags.4?true peer:InputPeer media:InputMedia media_areas:flags.5?Vector<MediaArea> caption:flags.0?string entities:flags.1?Vector<MessageEntity> privacy_rules:Vector<InputPrivacyRule> random_id:long period:flags.3?int = Updates; stories.sendStory#e4e6694b flags:# pinned:flags.2?true noforwards:flags.4?true fwd_modified:flags.7?true peer:InputPeer media:InputMedia media_areas:flags.5?Vector<MediaArea> caption:flags.0?string entities:flags.1?Vector<MessageEntity> privacy_rules:Vector<InputPrivacyRule> random_id:long period:flags.3?int fwd_from_id:flags.6?InputPeer fwd_from_story:flags.6?int = Updates;
stories.editStory#b583ba46 flags:# peer:InputPeer id:int media:flags.0?InputMedia media_areas:flags.3?Vector<MediaArea> caption:flags.1?string entities:flags.1?Vector<MessageEntity> privacy_rules:flags.2?Vector<InputPrivacyRule> = Updates; stories.editStory#b583ba46 flags:# peer:InputPeer id:int media:flags.0?InputMedia media_areas:flags.3?Vector<MediaArea> caption:flags.1?string entities:flags.1?Vector<MessageEntity> privacy_rules:flags.2?Vector<InputPrivacyRule> = Updates;
stories.deleteStories#ae59db5f peer:InputPeer id:Vector<int> = Vector<int>; stories.deleteStories#ae59db5f peer:InputPeer id:Vector<int> = Vector<int>;
stories.togglePinned#9a75a1ef peer:InputPeer id:Vector<int> pinned:Bool = Vector<int>; stories.togglePinned#9a75a1ef peer:InputPeer id:Vector<int> pinned:Bool = Vector<int>;
@ -2176,7 +2254,7 @@ stories.getStoriesByID#5774ca74 peer:InputPeer id:Vector<int> = stories.Stories;
stories.toggleAllStoriesHidden#7c2557c4 hidden:Bool = Bool; stories.toggleAllStoriesHidden#7c2557c4 hidden:Bool = Bool;
stories.readStories#a556dac8 peer:InputPeer max_id:int = Vector<int>; stories.readStories#a556dac8 peer:InputPeer max_id:int = Vector<int>;
stories.incrementStoryViews#b2028afb peer:InputPeer id:Vector<int> = Bool; stories.incrementStoryViews#b2028afb peer:InputPeer id:Vector<int> = Bool;
stories.getStoryViewsList#7ed23c57 flags:# just_contacts:flags.0?true reactions_first:flags.2?true peer:InputPeer q:flags.1?string id:int offset:string limit:int = stories.StoryViewsList; stories.getStoryViewsList#7ed23c57 flags:# just_contacts:flags.0?true reactions_first:flags.2?true forwards_first:flags.3?true peer:InputPeer q:flags.1?string id:int offset:string limit:int = stories.StoryViewsList;
stories.getStoriesViews#28e16cc8 peer:InputPeer id:Vector<int> = stories.StoryViews; stories.getStoriesViews#28e16cc8 peer:InputPeer id:Vector<int> = stories.StoryViews;
stories.exportStoryLink#7b8def20 peer:InputPeer id:int = ExportedStoryLink; stories.exportStoryLink#7b8def20 peer:InputPeer id:int = ExportedStoryLink;
stories.report#1923fa8c peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool; stories.report#1923fa8c peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool;
@ -2187,6 +2265,7 @@ stories.getAllReadPeerStories#9b5ae7f9 = Updates;
stories.getPeerMaxIDs#535983c3 id:Vector<InputPeer> = Vector<int>; stories.getPeerMaxIDs#535983c3 id:Vector<InputPeer> = Vector<int>;
stories.getChatsToSend#a56a8b60 = messages.Chats; stories.getChatsToSend#a56a8b60 = messages.Chats;
stories.togglePeerStoriesHidden#bd0415c4 peer:InputPeer hidden:Bool = Bool; stories.togglePeerStoriesHidden#bd0415c4 peer:InputPeer hidden:Bool = Bool;
stories.getStoryReactionsList#b9b2881f flags:# forwards_first:flags.2?true peer:InputPeer id:int reaction:flags.0?Reaction offset:flags.1?string limit:int = stories.StoryReactionsList;
premium.getBoostsList#60f67660 flags:# gifts:flags.0?true peer:InputPeer offset:string limit:int = premium.BoostsList; premium.getBoostsList#60f67660 flags:# gifts:flags.0?true peer:InputPeer offset:string limit:int = premium.BoostsList;
premium.getMyBoosts#be77b4a = premium.MyBoosts; premium.getMyBoosts#be77b4a = premium.MyBoosts;

View File

@ -185,7 +185,7 @@ void tl_print_parse_error (void) {
} }
char *parse_lex (void) { char *parse_lex (void) {
while (1) { while (1) {
while (curch && is_whitespace (curch)) { nextch (); } while (curch && is_whitespace (curch)) { nextch (); }
if (curch == '/' && nextch () == '/') { if (curch == '/' && nextch () == '/') {
while (nextch () != 10); while (nextch () != 10);
@ -235,7 +235,7 @@ char *parse_lex (void) {
case '.': case '.':
nextch (); nextch ();
parse.lex.len = 1; parse.lex.len = 1;
parse.lex.type = lex_char; parse.lex.type = lex_char;
return (parse.lex.ptr = p); return (parse.lex.ptr = p);
case 'a': case 'a':
case 'b': case 'b':
@ -334,10 +334,10 @@ char *parse_lex (void) {
int ok = 1; int ok = 1;
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if (!is_hexdigit (nextch())) { if (!is_hexdigit (nextch())) {
if (curch == ' ' && i >= 5) { if (curch == ' ' && i >= 5) {
ok = 2; ok = 2;
break; break;
} else { } else {
parse_error ("Hex digit expected"); parse_error ("Hex digit expected");
parse.lex.type = lex_error; parse.lex.type = lex_error;
return (parse.lex.ptr = (void *)-1); return (parse.lex.ptr = (void *)-1);
@ -370,7 +370,7 @@ char *parse_lex (void) {
parse.lex.type = lex_error; parse.lex.type = lex_error;
return (parse.lex.ptr = (void *)-1); return (parse.lex.ptr = (void *)-1);
} }
} }
int expect (char *s) { int expect (char *s) {
@ -453,7 +453,7 @@ struct tree *parse_full_combinator_id (void) {
} else { } else {
parse_error ("Can not parse full combinator id"); parse_error ("Can not parse full combinator id");
PARSE_FAIL; PARSE_FAIL;
} }
} }
struct tree *parse_combinator_id (void) { struct tree *parse_combinator_id (void) {
@ -467,7 +467,7 @@ struct tree *parse_combinator_id (void) {
} else { } else {
parse_error ("Can not parse combinator id"); parse_error ("Can not parse combinator id");
PARSE_FAIL; PARSE_FAIL;
} }
} }
struct tree *parse_var_ident (void) { struct tree *parse_var_ident (void) {
@ -595,7 +595,7 @@ struct tree *parse_subexpr (void) {
was_term = 1; was_term = 1;
PARSE_TRY (parse_term); PARSE_TRY (parse_term);
if (S) { if (S) {
tree_add_child (T, S); tree_add_child (T, S);
} else { } else {
break; break;
} }
@ -714,7 +714,7 @@ struct tree *parse_args4 (void) {
if (S) { if (S) {
tree_add_child (T, S); tree_add_child (T, S);
} else { } else {
load_parse (so); load_parse (so);
} }
if (LEX_CHAR ('!')) { if (LEX_CHAR ('!')) {
PARSE_ADD (type_exclam); PARSE_ADD (type_exclam);
@ -733,7 +733,7 @@ struct tree *parse_args3 (void) {
if (S) { if (S) {
tree_add_child (T, S); tree_add_child (T, S);
} else { } else {
load_parse (so); load_parse (so);
} }
if (LEX_CHAR ('!')) { if (LEX_CHAR ('!')) {
PARSE_ADD (type_exclam); PARSE_ADD (type_exclam);
@ -757,7 +757,7 @@ struct tree *parse_args2 (void) {
if (S) { if (S) {
tree_add_child (T, S); tree_add_child (T, S);
} else { } else {
load_parse (so); load_parse (so);
} }
struct parse save2 = save_parse (); struct parse save2 = save_parse ();
PARSE_TRY (parse_multiplicity); PARSE_TRY (parse_multiplicity);
@ -789,7 +789,7 @@ struct tree *parse_args1 (void) {
if (S) { if (S) {
tree_add_child (T, S); tree_add_child (T, S);
} else { } else {
load_parse (so); load_parse (so);
} }
if (LEX_CHAR ('!')) { if (LEX_CHAR ('!')) {
PARSE_ADD (type_exclam); PARSE_ADD (type_exclam);
@ -1041,7 +1041,7 @@ int tl_add_field (char *id) {
void tl_clear_fields (void) { void tl_clear_fields (void) {
// tree_act_tl_field (fields[namespace_level], (void *)free); // tree_act_tl_field (fields[namespace_level], (void *)free);
fields[namespace_level] = tree_clear_tl_field (fields[namespace_level]); fields[namespace_level] = tree_clear_tl_field (fields[namespace_level]);
} }
struct tl_var *tl_add_var (char *id, struct tl_combinator_tree *ptr, int type) { struct tl_var *tl_add_var (char *id, struct tl_combinator_tree *ptr, int type) {
@ -1151,9 +1151,9 @@ struct tl_type *tl_add_type (const char *_id, int len, int params_num, long long
void tl_add_type_param (struct tl_type *t, int x) { void tl_add_type_param (struct tl_type *t, int x) {
assert (t->flags & 4); assert (t->flags & 4);
assert (t->params_num <= 64); assert (t->params_num <= 64);
if (x) { if (x) {
t->params_types |= (1ull << (t->params_num ++)); t->params_types |= (1ull << (t->params_num ++));
} else { } else {
t->params_num ++; t->params_num ++;
} }
@ -1222,7 +1222,7 @@ struct tl_constructor *tl_add_constructor (struct tl_type *a, const char *_id, i
struct tl_constructor *t = talloc (sizeof (*t)); struct tl_constructor *t = talloc (sizeof (*t));
t->type = a; t->type = a;
t->name = magic; t->name = magic;
t->id = id; t->id = id;
t->print_id = tstrdup (id); t->print_id = tstrdup (id);
t->real_id = 0; t->real_id = 0;
@ -1282,7 +1282,7 @@ struct tl_constructor *tl_add_function (struct tl_type *a, const char *_id, int
struct tl_constructor *t = talloc (sizeof (*t)); struct tl_constructor *t = talloc (sizeof (*t));
t->type = a; t->type = a;
t->name = magic; t->name = magic;
t->id = id; t->id = id;
t->print_id = tstrdup (id); t->print_id = tstrdup (id);
t->real_id = 0; t->real_id = 0;
@ -1455,7 +1455,7 @@ void tl_buf_add_tree (struct tl_combinator_tree *T, int x) {
tl_buf_add_tree (T->right, 0); tl_buf_add_tree (T->right, 0);
return; return;
} }
default: default:
fprintf (stderr, "%s %s\n", TL_ACT (T->act), TL_TYPE (T->type)); fprintf (stderr, "%s %s\n", TL_ACT (T->act), TL_TYPE (T->type));
assert (0); assert (0);
@ -1549,7 +1549,7 @@ struct tl_combinator_tree *tl_union (struct tl_combinator_tree *L, struct tl_com
tfree (v, sizeof (*v)); tfree (v, sizeof (*v));
R->type_flags += L->type_flags; R->type_flags += L->type_flags;
return R; return R;
case type_list_item: case type_list_item:
case type_list: case type_list:
if (R->type != type_list_item) { if (R->type != type_list_item) {
TL_ERROR ("Union: type mistmatch\n"); TL_ERROR ("Union: type mistmatch\n");
@ -1561,7 +1561,7 @@ struct tl_combinator_tree *tl_union (struct tl_combinator_tree *L, struct tl_com
case type_type: case type_type:
if (L->type_len == 0) { if (L->type_len == 0) {
TL_ERROR ("Arguments number exceeds type arity\n"); TL_ERROR ("Arguments number exceeds type arity\n");
return 0; return 0;
} }
if (R->type != type_num && R->type != type_type && R->type != type_num_value) { if (R->type != type_num && R->type != type_type && R->type != type_num_value) {
TL_ERROR ("Union: type mistmatch\n"); TL_ERROR ("Union: type mistmatch\n");
@ -1574,7 +1574,7 @@ struct tl_combinator_tree *tl_union (struct tl_combinator_tree *L, struct tl_com
} }
if (R->type_len > 0) { if (R->type_len > 0) {
TL_ERROR ("Argument type must have full number of arguments\n"); TL_ERROR ("Argument type must have full number of arguments\n");
return 0; return 0;
} }
if (L->type_len > 0 && ((L->type_flags & 1) != (R->type == type_num || R->type == type_num_value))) { if (L->type_len > 0 && ((L->type_flags & 1) != (R->type == type_num || R->type == type_num_value))) {
TL_ERROR ("Argument types mistmatch: L->type_flags = %lld, R->type = %s\n", L->flags, TL_TYPE (R->type)); TL_ERROR ("Argument types mistmatch: L->type_flags = %lld, R->type = %s\n", L->flags, TL_TYPE (R->type));
@ -1595,7 +1595,7 @@ struct tl_combinator_tree *tl_parse_any_term (struct tree *T, int s);
struct tl_combinator_tree *tl_parse_term (struct tree *T, int s) { struct tl_combinator_tree *tl_parse_term (struct tree *T, int s) {
assert (T->type == type_term); assert (T->type == type_term);
int i = 0; int i = 0;
while (i < T->nc && T->c[i]->type == type_percent) { i ++; s ++; } while (i < T->nc && T->c[i]->type == type_percent) { i ++; s ++; }
assert (i < T->nc); assert (i < T->nc);
TL_INIT (L); TL_INIT (L);
while (i < T->nc) { while (i < T->nc) {
@ -1610,7 +1610,7 @@ struct tl_combinator_tree *tl_parse_term (struct tree *T, int s) {
struct tl_combinator_tree *tl_parse_type_term (struct tree *T, int s) { struct tl_combinator_tree *tl_parse_type_term (struct tree *T, int s) {
assert (T->type == type_type_term); assert (T->type == type_type_term);
assert (T->nc == 1); assert (T->nc == 1);
struct tl_combinator_tree *Z = tl_parse_term (T->c[0], s); struct tl_combinator_tree *Z = tl_parse_term (T->c[0], s);
if (!Z || Z->type != type_type) { if (Z) { TL_ERROR ("type_term: found type %s\n", TL_TYPE (Z->type)); } TL_FAIL; } if (!Z || Z->type != type_type) { if (Z) { TL_ERROR ("type_term: found type %s\n", TL_TYPE (Z->type)); } TL_FAIL; }
return Z; return Z;
} }
@ -1674,7 +1674,7 @@ struct tl_combinator_tree *tl_parse_ident (struct tree *T, int s) {
assert (!T->nc); assert (!T->nc);
struct tl_var *v = tl_get_var (T->text, T->len); struct tl_var *v = tl_get_var (T->text, T->len);
TL_INIT (L); TL_INIT (L);
if (v) { if (v) {
L = alloc_ctree_node (); L = alloc_ctree_node ();
L->act = act_var; L->act = act_var;
L->type = v->type ? type_num : type_type; L->type = v->type ? type_num : type_type;
@ -1733,7 +1733,7 @@ struct tl_combinator_tree *tl_parse_ident (struct tree *T, int s) {
L->data = t; L->data = t;
L->type = type_type; L->type = type_type;
L->type_len = t->params_num; L->type_len = t->params_num;
L->type_flags = t->params_types; L->type_flags = t->params_types;
return L; return L;
} else { } else {
TL_ERROR ("Not a type/var ident `%.*s`\n", T->len, T->text); TL_ERROR ("Not a type/var ident `%.*s`\n", T->len, T->text);
@ -1761,7 +1761,7 @@ struct tl_combinator_tree *tl_parse_any_term (struct tree *T, int s) {
default: default:
fprintf (stderr, "type = %d\n", T->type); fprintf (stderr, "type = %d\n", T->type);
assert (0); assert (0);
return 0; return 0;
} }
} }
@ -1834,11 +1834,11 @@ struct tl_combinator_tree *tl_parse_args2 (struct tree *T) {
if (T->c[x]->type == type_var_ident_opt || T->c[x]->type == type_var_ident) { if (T->c[x]->type == type_var_ident_opt || T->c[x]->type == type_var_ident) {
field_name = mystrdup (T->c[x]->text, T->c[x]->len); field_name = mystrdup (T->c[x]->text, T->c[x]->len);
if (!tl_add_field (field_name)) { if (!tl_add_field (field_name)) {
TL_ERROR ("Duplicate field name %s\n", field_name); TL_ERROR ("Duplicate field name %s\n", field_name);
TL_FAIL; TL_FAIL;
} }
x ++; x ++;
} }
//fprintf (stderr, "%d %d\n", x, T->nc); //fprintf (stderr, "%d %d\n", x, T->nc);
if (T->c[x]->type == type_multiplicity) { if (T->c[x]->type == type_multiplicity) {
L = tl_parse_multiplicity (T->c[x]); L = tl_parse_multiplicity (T->c[x]);
@ -1846,7 +1846,7 @@ struct tl_combinator_tree *tl_parse_args2 (struct tree *T) {
x ++; x ++;
} else { } else {
struct tl_var *v = tl_get_last_num_var (); struct tl_var *v = tl_get_last_num_var ();
if (!v) { if (!v) {
TL_ERROR ("Expected multiplicity or nat var\n"); TL_ERROR ("Expected multiplicity or nat var\n");
TL_FAIL; TL_FAIL;
} }
@ -1880,7 +1880,7 @@ struct tl_combinator_tree *tl_parse_args2 (struct tree *T) {
H->right = 0; H->right = 0;
H->data = field_name; H->data = field_name;
H->type_len = 0; H->type_len = 0;
return H; return H;
} }
@ -1971,7 +1971,7 @@ struct tl_combinator_tree *tl_parse_args134 (struct tree *T) {
if (!v) {TL_FAIL;} if (!v) {TL_FAIL;}
v->flags |= 2; v->flags |= 2;
} }
H = tl_union (H, S); H = tl_union (H, S);
} }
return H; return H;
@ -1993,7 +1993,7 @@ struct tl_combinator_tree *tl_parse_args (struct tree *T) {
default: default:
assert (0); assert (0);
return 0; return 0;
} }
} }
void tl_mark_vars (struct tl_combinator_tree *T) { void tl_mark_vars (struct tl_combinator_tree *T) {
@ -2012,7 +2012,7 @@ struct tl_combinator_tree *tl_parse_result_type (struct tree *T) {
assert (T->type == type_result_type); assert (T->type == type_result_type);
assert (T->nc >= 1); assert (T->nc >= 1);
assert (T->nc <= 64); assert (T->nc <= 64);
TL_INIT (L); TL_INIT (L);
if (tl_get_var (T->c[0]->text, T->c[0]->len)) { if (tl_get_var (T->c[0]->text, T->c[0]->len)) {
@ -2043,7 +2043,7 @@ struct tl_combinator_tree *tl_parse_result_type (struct tree *T) {
int i; int i;
for (i = 1; i < T->nc; i++) { for (i = 1; i < T->nc; i++) {
TL_TRY (tl_parse_any_term (T->c[i], 0), L); TL_TRY (tl_parse_any_term (T->c[i], 0), L);
assert (L->right); assert (L->right);
assert (L->right->type == type_num || L->right->type == type_num_value || (L->right->type == type_type && L->right->type_len == 0)); assert (L->right->type == type_num || L->right->type == type_num_value || (L->right->type == type_type && L->right->type_len == 0));
} }
} }
@ -2090,7 +2090,7 @@ int tl_parse_combinator_decl (struct tree *T, int fun) {
TL_ERROR ("Only functions can return variables\n"); TL_ERROR ("Only functions can return variables\n");
} }
assert (t || fun); assert (t || fun);
assert (namespace_level == 0); assert (namespace_level == 0);
__ok = 1; __ok = 1;
tree_act_tl_var (vars[0], tl_var_check_used); tree_act_tl_var (vars[0], tl_var_check_used);
@ -2098,7 +2098,7 @@ int tl_parse_combinator_decl (struct tree *T, int fun) {
TL_ERROR ("Not all variables are used in right side\n"); TL_ERROR ("Not all variables are used in right side\n");
TL_FAIL; TL_FAIL;
} }
if (tl_get_constructor (T->c[0]->text, T->c[0]->len) || tl_get_function (T->c[0]->text, T->c[0]->len)) { if (tl_get_constructor (T->c[0]->text, T->c[0]->len) || tl_get_function (T->c[0]->text, T->c[0]->len)) {
TL_ERROR ("Duplicate combinator id %.*s\n", T->c[0]->len, T->c[0]->text); TL_ERROR ("Duplicate combinator id %.*s\n", T->c[0]->len, T->c[0]->text);
return 0; return 0;
@ -2107,7 +2107,7 @@ int tl_parse_combinator_decl (struct tree *T, int fun) {
if (!c) { TL_FAIL; } if (!c) { TL_FAIL; }
c->left = L; c->left = L;
c->right = R; c->right = R;
if (!c->name) { if (!c->name) {
tl_count_combinator_name (c); tl_count_combinator_name (c);
} }
@ -2163,7 +2163,7 @@ struct tl_combinator_tree *change_first_var (struct tl_combinator_tree *O, struc
if (O->data == *X) { if (O->data == *X) {
struct tl_combinator_tree *R = tl_tree_dup (Y); struct tl_combinator_tree *R = tl_tree_dup (Y);
if (O->type == type_num || O->type == type_num_value) { R->type_flags += O->type_flags; } if (O->type == type_num || O->type == type_num_value) { R->type_flags += O->type_flags; }
return R; return R;
} }
} }
struct tl_combinator_tree *t; struct tl_combinator_tree *t;
@ -2174,7 +2174,7 @@ struct tl_combinator_tree *change_first_var (struct tl_combinator_tree *O, struc
if (!t) { return 0;} if (!t) { return 0;}
if (t == (void *)-1l) { return (void *)-1l; } if (t == (void *)-1l) { return (void *)-1l; }
if (t != (void *)-2l) { return t;} if (t != (void *)-2l) { return t;}
return (void *)-1l; return (void *)-1l;
} }
if (t != (void *)-2l) { if (t != (void *)-2l) {
O->left = t; O->left = t;
@ -2182,7 +2182,7 @@ struct tl_combinator_tree *change_first_var (struct tl_combinator_tree *O, struc
t = change_first_var (O->right, X, Y); t = change_first_var (O->right, X, Y);
if (!t) { return 0;} if (!t) { return 0;}
if (t == (void *)-1l) { if (t == (void *)-1l) {
return O->left; return O->left;
} }
if (t != (void *)-2l) { if (t != (void *)-2l) {
O->right = t; O->right = t;
@ -2267,7 +2267,7 @@ struct tl_combinator_tree *change_value_var (struct tl_combinator_tree *O, struc
if (!t) { return 0;} if (!t) { return 0;}
if (t == (void *)-1l) { return (void *)-1l; } if (t == (void *)-1l) { return (void *)-1l; }
if (t != (void *)-2l) { return t;} if (t != (void *)-2l) { return t;}
return (void *)-1l; return (void *)-1l;
} }
if (t != (void *)-2l) { if (t != (void *)-2l) {
O->left = t; O->left = t;
@ -2275,7 +2275,7 @@ struct tl_combinator_tree *change_value_var (struct tl_combinator_tree *O, struc
t = change_value_var (O->right, X); t = change_value_var (O->right, X);
if (!t) { return 0;} if (!t) { return 0;}
if (t == (void *)-1l) { if (t == (void *)-1l) {
return O->left; return O->left;
} }
if (t != (void *)-2l) { if (t != (void *)-2l) {
O->right = t; O->right = t;
@ -2324,7 +2324,7 @@ int tl_parse_partial_type_app_decl (struct tree *T) {
assert (nt); assert (nt);
//snprintf (_buf, 100000, "%s #", t->id); //snprintf (_buf, 100000, "%s #", t->id);
//nt->real_id = strdup (_buf); //nt->real_id = strdup (_buf);
for (i = 0; i < t->constructors_num; i++) { for (i = 0; i < t->constructors_num; i++) {
struct tl_constructor *c = t->constructors[i]; struct tl_constructor *c = t->constructors[i];
struct tree_var_value *V = 0; struct tree_var_value *V = 0;
@ -2332,7 +2332,7 @@ int tl_parse_partial_type_app_decl (struct tree *T) {
TL_INIT (B); TL_INIT (B);
A = tl_tree_dup (c->left); A = tl_tree_dup (c->left);
B = tl_tree_dup (c->right); B = tl_tree_dup (c->right);
struct tree_var_value *W = 0; struct tree_var_value *W = 0;
change_var_ptrs (c->left, A, &W); change_var_ptrs (c->left, A, &W);
change_var_ptrs (c->right, B, &W); change_var_ptrs (c->right, B, &W);
@ -2349,7 +2349,7 @@ int tl_parse_partial_type_app_decl (struct tree *T) {
struct tl_constructor *r = tl_add_constructor (nt, _buf, strlen (_buf), 1); struct tl_constructor *r = tl_add_constructor (nt, _buf, strlen (_buf), 1);
snprintf (_buf, 100000, "%s", c->id); snprintf (_buf, 100000, "%s", c->id);
r->real_id = tstrdup (_buf); r->real_id = tstrdup (_buf);
r->left = A; r->left = A;
r->right = B; r->right = B;
if (!r->name) { if (!r->name) {
@ -2377,8 +2377,8 @@ int tl_parse_partial_comb_app_decl (struct tree *T, int fun) {
TL_INIT (R); TL_INIT (R);
L = tl_tree_dup (c->left); L = tl_tree_dup (c->left);
R = tl_tree_dup (c->right); R = tl_tree_dup (c->right);
struct tree_var_value *V = 0; struct tree_var_value *V = 0;
change_var_ptrs (c->left, L, &V); change_var_ptrs (c->left, L, &V);
change_var_ptrs (c->right, R, &V); change_var_ptrs (c->right, R, &V);
@ -2391,7 +2391,7 @@ int tl_parse_partial_comb_app_decl (struct tree *T, int fun) {
TL_INIT (Z); TL_INIT (Z);
X = tl_parse_any_term (T->c[i], 0); X = tl_parse_any_term (T->c[i], 0);
struct tl_combinator_tree *K = 0; struct tl_combinator_tree *K = 0;
if (!(Z = change_first_var (L, &K, X))) { if (!(Z = change_first_var (L, &K, X))) {
TL_FAIL; TL_FAIL;
} }
L = Z; L = Z;
@ -2516,7 +2516,7 @@ int tl_parse_builtin_combinator_decl (struct tree *T, int fun) {
if (!c) { if (!c) {
return 0; return 0;
} }
c->left = alloc_ctree_node (); c->left = alloc_ctree_node ();
c->left->act = act_question_mark; c->left->act = act_question_mark;
c->left->type = type_list_item; c->left->type = type_list_item;
@ -2615,7 +2615,7 @@ int uniformize (struct tl_combinator_tree *L, struct tl_combinator_tree *R, stru
if (R->act == act_var) { if (R->act == act_var) {
struct tl_combinator_tree *_ = R; R = L; L = _; struct tl_combinator_tree *_ = R; R = L; L = _;
} }
if (L->type == type_type) { if (L->type == type_type) {
if (R->type != type_type || L->type_len != R->type_len || L->type_flags != R->type_flags) { if (R->type != type_type || L->type_len != R->type_len || L->type_flags != R->type_flags) {
return 0; return 0;
@ -2695,14 +2695,14 @@ int uniformize (struct tl_combinator_tree *L, struct tl_combinator_tree *R, stru
M = tl_get_var_value (T, M->data); M = tl_get_var_value (T, M->data);
} }
if (K->type == type_num_value && M->type == type_num_value) { if (K->type == type_num_value && M->type == type_num_value) {
return x == y; return x == y;
} }
if (M->type == type_num_value) { if (M->type == type_num_value) {
tl_set_var_value_num (T, K->data, M, -(x - y + M->type_flags)); tl_set_var_value_num (T, K->data, M, -(x - y + M->type_flags));
return 1; return 1;
} else if (K->type == type_num_value) { } else if (K->type == type_num_value) {
tl_set_var_value_num (T, M->data, K, -(y - x + K->type_flags)); tl_set_var_value_num (T, M->data, K, -(y - x + K->type_flags));
return 1; return 1;
} else { } else {
if (x >= y) { if (x >= y) {
tl_set_var_value_num (T, K->data, M, -(x - y + M->type_flags)); tl_set_var_value_num (T, K->data, M, -(x - y + M->type_flags));
@ -2720,7 +2720,7 @@ void tl_type_check (struct tl_type *t) {
if (!__ok) return; if (!__ok) return;
if (!strcmp (t->id, "#")) { t->name = 0x70659eff; return; } if (!strcmp (t->id, "#")) { t->name = 0x70659eff; return; }
if (!strcmp (t->id, "Type")) { t->name = 0x2cecf817; return; } if (!strcmp (t->id, "Type")) { t->name = 0x2cecf817; return; }
if (t->constructors_num <= 0 && !(t->flags & FLAG_EMPTY)) { if (t->constructors_num <= 0 && !(t->flags & FLAG_EMPTY)) {
TL_ERROR ("Type %s has no constructors\n", t->id); TL_ERROR ("Type %s has no constructors\n", t->id);
__ok = 0; __ok = 0;
return; return;
@ -2739,7 +2739,7 @@ void tl_type_check (struct tl_type *t) {
} }
} }
if ((t->flags & 24) == 24) { if ((t->flags & 24) == 24) {
TL_WARNING ("Warning: Type %s has overlapping costructors, but it is used with `%%`\n", t->id); TL_WARNING ("Warning: Type %s has overlapping costructors, but it is used with `%%`\n", t->id);
} }
int z = 0; int z = 0;
int sid = 0; int sid = 0;
@ -2907,7 +2907,7 @@ void write_args (struct tl_combinator_tree *T, struct tree_var_value **v, int *l
tl_set_var_value_num (v, T, 0, (*last_var) - 1); tl_set_var_value_num (v, T, 0, (*last_var) - 1);
} else { } else {
write_field_flags (f); write_field_flags (f);
} }
write_tree (T->left, 0, v, last_var); write_tree (T->left, 0, v, last_var);
} }

View File

@ -132,7 +132,7 @@ int main (int argc, char **argv) {
if (argc != optind + 1) { if (argc != optind + 1) {
usage (); usage ();
} }
struct parse *P = tl_init_parse_file (argv[optind]); struct parse *P = tl_init_parse_file (argv[optind]);
if (!P) { if (!P) {

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -230,14 +230,25 @@ std::string TD_TL_writer_cpp::gen_field_fetch(int field_num, const tl::arg &a, s
} }
assert(!(a.flags & tl::FLAG_EXCL)); assert(!(a.flags & tl::FLAG_EXCL));
assert(!(a.flags & tl::FLAG_OPT_VAR)); assert(!(a.flags & tl::FLAG_OPT_VAR));
std::string res = " ";
if (a.exist_var_num != -1) { if (a.exist_var_num != -1) {
assert(0 <= a.exist_var_num && a.exist_var_num < static_cast<int>(vars.size())); assert(0 <= a.exist_var_num && a.exist_var_num < static_cast<int>(vars.size()));
assert(vars[a.exist_var_num].is_stored); assert(vars[a.exist_var_num].is_stored);
if (a.var_num == -1 && parser_type != 0) {
assert(a.type->get_type() == tl::NODE_TYPE_TYPE);
const tl::tl_tree_type *tree_type = static_cast<tl::tl_tree_type *>(a.type);
if (tree_type->flags & tl::FLAG_BARE && tree_type->type->name == "True") {
assert(is_type_bare(tree_type->type));
return " " + field_name + " = (" + gen_var_name(vars[a.exist_var_num]) + " & " +
int_to_string(1 << a.exist_var_bit) + ") != 0;\n";
}
}
}
std::string res = " ";
if (a.exist_var_num != -1) {
res += "if (" + gen_var_name(vars[a.exist_var_num]) + " & " + int_to_string(1 << a.exist_var_bit) + ") { "; res += "if (" + gen_var_name(vars[a.exist_var_num]) + " & " + int_to_string(1 << a.exist_var_bit) + ") { ";
} }
@ -449,17 +460,24 @@ std::string TD_TL_writer_cpp::gen_field_store(const tl::arg &a, std::vector<tl::
return ""; return "";
} }
if (a.exist_var_num >= 0 && a.var_num < 0 && a.type->get_type() == tl::NODE_TYPE_TYPE) {
const tl::tl_tree_type *tree_type = static_cast<tl::tl_tree_type *>(a.type);
if (tree_type->type->name == "True") {
return "";
}
}
if (a.exist_var_num >= 0) { if (a.exist_var_num >= 0) {
assert(a.exist_var_num < static_cast<int>(vars.size())); assert(a.exist_var_num < static_cast<int>(vars.size()));
assert(vars[a.exist_var_num].is_stored); assert(vars[a.exist_var_num].is_stored);
if (a.var_num == -1 && a.type->get_type() == tl::NODE_TYPE_TYPE) {
const tl::tl_tree_type *tree_type = static_cast<tl::tl_tree_type *>(a.type);
if (tree_type->type->name == "True") {
if (storer_type == 1) {
return " if (" + gen_var_name(vars[a.exist_var_num]) + " & " + int_to_string(1 << a.exist_var_bit) +
") { s.store_field(\"" + get_pretty_field_name(field_name) + "\", true); }\n";
} else {
return "";
}
}
}
}
if (a.exist_var_num >= 0) {
res += "if (" + gen_var_name(vars[a.exist_var_num]) + " & " + int_to_string(1 << a.exist_var_bit) + ") { "; res += "if (" + gen_var_name(vars[a.exist_var_num]) + " & " + int_to_string(1 << a.exist_var_bit) + ") { ";
} }

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -264,8 +264,16 @@ std::string TD_TL_writer_h::gen_forward_class_declaration(const std::string &cla
std::string TD_TL_writer_h::gen_class_begin(const std::string &class_name, const std::string &base_class_name, std::string TD_TL_writer_h::gen_class_begin(const std::string &class_name, const std::string &base_class_name,
bool is_proxy, const tl::tl_tree *result) const { bool is_proxy, const tl::tl_tree *result) const {
return "class " + class_name + (!is_proxy ? " final " : "") + ": public " + base_class_name + if (is_proxy) {
return "class " + class_name + ": public " + base_class_name +
" {\n"
" public:\n";
}
return "class " + class_name + " final : public " + base_class_name +
" {\n" " {\n"
" std::int32_t get_id() const final {\n"
" return ID;\n"
" }\n\n"
" public:\n"; " public:\n";
} }
@ -289,11 +297,7 @@ std::string TD_TL_writer_h::gen_get_id(const std::string &class_name, std::int32
return "\n" return "\n"
" static const std::int32_t ID = " + " static const std::int32_t ID = " +
int_to_string(id) + int_to_string(id) + ";\n";
";\n"
" std::int32_t get_id() const final {\n"
" return ID;\n"
" }\n";
} }
std::string TD_TL_writer_h::gen_function_result_type(const tl::tl_tree *result) const { std::string TD_TL_writer_h::gen_function_result_type(const tl::tl_tree *result) const {

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -105,10 +105,7 @@ std::string TD_TL_writer_jni_h::gen_class_begin(const std::string &class_name, c
" virtual void store(TlStorerToString &s, const char *field_name) const = 0;\n\n" " virtual void store(TlStorerToString &s, const char *field_name) const = 0;\n\n"
" static jclass Class;\n"; " static jclass Class;\n";
} }
return "class " + class_name + (!is_proxy ? " final " : "") + ": public " + base_class_name + return TD_TL_writer_h::gen_class_begin(class_name, base_class_name, is_proxy, result) + " static jclass Class;\n";
" {\n"
" public:\n"
" static jclass Class;\n";
} }
std::string TD_TL_writer_jni_h::gen_field_definition(const std::string &class_name, const std::string &type_name, std::string TD_TL_writer_jni_h::gen_field_definition(const std::string &class_name, const std::string &type_name,

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -34,13 +34,13 @@ namespace mtproto {
template <class Object, class ObjectStorer> template <class Object, class ObjectStorer>
class ObjectImpl { class ObjectImpl {
public: public:
ObjectImpl(bool not_empty, Object &&object, AuthData *auth_data, bool need_ack = false) ObjectImpl(bool not_empty, Object &&object, AuthData *auth_data)
: not_empty_(not_empty), object_(std::move(object)), object_storer_(object_) { : not_empty_(not_empty), object_(std::move(object)), object_storer_(object_) {
if (empty()) { if (empty()) {
return; return;
} }
message_id_ = auth_data->next_message_id(Time::now_cached()); message_id_ = auth_data->next_message_id(Time::now_cached());
seq_no_ = auth_data->next_seq_no(need_ack); seq_no_ = auth_data->next_seq_no(false);
} }
template <class StorerT> template <class StorerT>
void do_store(StorerT &storer) const { void do_store(StorerT &storer) const {
@ -81,10 +81,10 @@ using DestroyAuthKeyImpl = ObjectImpl<mtproto_api::destroy_auth_key, TLStorer<mt
class CancelVectorImpl { class CancelVectorImpl {
public: public:
CancelVectorImpl(bool not_empty, const vector<int64> &to_cancel, AuthData *auth_data, bool need_ack) { CancelVectorImpl(bool not_empty, const vector<int64> &to_cancel, AuthData *auth_data) {
storers_.reserve(to_cancel.size()); storers_.reserve(to_cancel.size());
for (auto &request_id : to_cancel) { for (auto &request_id : to_cancel) {
storers_.emplace_back(true, mtproto_api::rpc_drop_answer(request_id), auth_data, true); storers_.emplace_back(true, mtproto_api::rpc_drop_answer(request_id), auth_data);
} }
} }
@ -215,13 +215,13 @@ class CryptoImpl {
, http_wait_storer_(max_delay >= 0, mtproto_api::http_wait(max_delay, max_after, max_wait), auth_data) , http_wait_storer_(max_delay >= 0, mtproto_api::http_wait(max_delay, max_after, max_wait), auth_data)
, get_future_salts_storer_(future_salt_n > 0, mtproto_api::get_future_salts(future_salt_n), auth_data) , get_future_salts_storer_(future_salt_n > 0, mtproto_api::get_future_salts(future_salt_n), auth_data)
, get_info_not_empty_(!get_info.empty()) , get_info_not_empty_(!get_info.empty())
, get_info_storer_(get_info_not_empty_, mtproto_api::msgs_state_req(std::move(get_info)), auth_data, true) , get_info_storer_(get_info_not_empty_, mtproto_api::msgs_state_req(std::move(get_info)), auth_data)
, resend_not_empty_(!resend.empty()) , resend_not_empty_(!resend.empty())
, resend_storer_(resend_not_empty_, mtproto_api::msg_resend_req(std::move(resend)), auth_data, true) , resend_storer_(resend_not_empty_, mtproto_api::msg_resend_req(std::move(resend)), auth_data)
, cancel_not_empty_(!cancel.empty()) , cancel_not_empty_(!cancel.empty())
, cancel_cnt_(static_cast<int32>(cancel.size())) , cancel_cnt_(static_cast<int32>(cancel.size()))
, cancel_storer_(cancel_not_empty_, cancel, auth_data, true) , cancel_storer_(cancel_not_empty_, cancel, auth_data)
, destroy_key_storer_(destroy_key, mtproto_api::destroy_auth_key(), auth_data, true) , destroy_key_storer_(destroy_key, mtproto_api::destroy_auth_key(), auth_data)
, ping_storer_(ping_id != 0, mtproto_api::ping_delay_disconnect(ping_id, ping_timeout), auth_data) , ping_storer_(ping_id != 0, mtproto_api::ping_delay_disconnect(ping_id, ping_timeout), auth_data)
, tmp_storer_(query_storer_, ack_storer_) , tmp_storer_(query_storer_, ack_storer_)
, tmp2_storer_(tmp_storer_, http_wait_storer_) , tmp2_storer_(tmp_storer_, http_wait_storer_)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

View File

@ -1,5 +1,5 @@
// //
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
// //
// Distributed under the Boost Software License, Version 1.0. (See accompanying // Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Some files were not shown because too many files have changed in this diff Show More