diff --git a/harbour-fernschreiber.pro b/harbour-fernschreiber.pro
index 62bb2f0..34d593d 100644
--- a/harbour-fernschreiber.pro
+++ b/harbour-fernschreiber.pro
@@ -108,6 +108,7 @@ DISTFILES += qml/harbour-fernschreiber.qml \
qml/components/messageContent/MessageVideoNote.qml \
qml/components/messageContent/MessageVideo.qml \
qml/components/messageContent/MessageVoiceNote.qml \
+ qml/components/messageContent/SponsoredMessage.qml \
qml/components/messageContent/WebPagePreview.qml \
qml/components/settingsPage/Accordion.qml \
qml/components/settingsPage/AccordionItem.qml \
diff --git a/qml/components/MessageListViewItem.qml b/qml/components/MessageListViewItem.qml
index 768db9d..8755ce7 100644
--- a/qml/components/MessageListViewItem.qml
+++ b/qml/components/MessageListViewItem.qml
@@ -141,7 +141,7 @@ ListItem {
text: qsTr("Reply to Message")
}
MenuItem {
- visible: myMessage.can_be_edited
+ visible: typeof myMessage.can_be_edited !== "undefined" && myMessage.can_be_edited
onClicked: editMessage()
text: qsTr("Edit Message")
}
@@ -187,16 +187,16 @@ ListItem {
Connections {
target: chatModel
onMessagesReceived: {
- messageBackground.isUnread = index > chatModel.getLastReadMessageIndex();
+ messageBackground.isUnread = index > chatModel.getLastReadMessageIndex() && myMessage['@type'] !== "sponsoredMessage";
}
onMessagesIncrementalUpdate: {
- messageBackground.isUnread = index > chatModel.getLastReadMessageIndex();
+ messageBackground.isUnread = index > chatModel.getLastReadMessageIndex() && myMessage['@type'] !== "sponsoredMessage";
}
onNewMessageReceived: {
- messageBackground.isUnread = index > chatModel.getLastReadMessageIndex();
+ messageBackground.isUnread = index > chatModel.getLastReadMessageIndex() && myMessage['@type'] !== "sponsoredMessage";
}
onUnreadCountUpdated: {
- messageBackground.isUnread = index > chatModel.getLastReadMessageIndex();
+ messageBackground.isUnread = index > chatModel.getLastReadMessageIndex() && myMessage['@type'] !== "sponsoredMessage";
}
onLastReadSentMessageUpdated: {
Debug.log("[ChatModel] Messages in this chat were read, new last read: ", lastReadSentIndex, ", updating description for index ", index, ", status: ", (index <= lastReadSentIndex));
@@ -305,7 +305,7 @@ ListItem {
}
height: messageTextColumn.height + precalculatedValues.paddingMediumDouble
width: precalculatedValues.backgroundWidth
- property bool isUnread: index > chatModel.getLastReadMessageIndex()
+ property bool isUnread: index > chatModel.getLastReadMessageIndex() && myMessage['@type'] !== "sponsoredMessage"
color: Theme.colorScheme === Theme.LightOnDark ? (isUnread ? Theme.secondaryHighlightColor : Theme.secondaryColor) : (isUnread ? Theme.backgroundGlowColor : Theme.overlayBackgroundColor)
radius: parent.width / 50
opacity: isUnread ? 0.5 : 0.2
@@ -327,7 +327,7 @@ ListItem {
id: userText
width: parent.width
- text: messageListItem.isOwnMessage ? qsTr("You") : Emoji.emojify(messageListItem.isAnonymous ? page.chatInformation.title : Functions.getUserName(messageListItem.userInformation), font.pixelSize)
+ text: messageListItem.isOwnMessage ? qsTr("You") : Emoji.emojify( myMessage['@type'] === "sponsoredMessage" ? tdLibWrapper.getChat(myMessage.sponsor_chat_id).title : ( messageListItem.isAnonymous ? page.chatInformation.title : Functions.getUserName(messageListItem.userInformation) ), font.pixelSize)
font.pixelSize: Theme.fontSizeExtraSmall
font.weight: Font.ExtraBold
color: messageListItem.textColor
@@ -335,7 +335,7 @@ ListItem {
truncationMode: TruncationMode.Fade
textFormat: Text.StyledText
horizontalAlignment: messageListItem.textAlign
- visible: precalculatedValues.showUserInfo
+ visible: precalculatedValues.showUserInfo || myMessage['@type'] === "sponsoredMessage"
MouseArea {
anchors.fill: parent
enabled: !(messageListItem.precalculatedValues.pageIsSelecting || messageListItem.isAnonymous)
@@ -351,7 +351,7 @@ ListItem {
Loader {
id: messageInReplyToLoader
- active: myMessage.reply_to_message_id !== 0
+ active: typeof myMessage.reply_to_message_id !== "undefined" && myMessage.reply_to_message_id !== 0
width: parent.width
// text height ~= 1,28*font.pixelSize
height: active ? precalculatedValues.messageInReplyToHeight : 0
@@ -458,6 +458,21 @@ ListItem {
visible: (text !== "")
}
+ Loader {
+ id: sponsoredMessageButtonLoader
+ active: myMessage['@type'] === "sponsoredMessage"
+ asynchronous: true
+ width: parent.width
+ height: (status === Loader.Ready) ? item.implicitHeight : myMessage['@type'] === "sponsoredMessage" ? Theme.itemSizeMedium : 0
+
+ sourceComponent: Component {
+ SponsoredMessage {
+ sponsoredMessageData: myMessage
+ width: parent.width
+ }
+ }
+ }
+
Loader {
id: webPagePreviewLoader
active: false
diff --git a/qml/components/messageContent/SponsoredMessage.qml b/qml/components/messageContent/SponsoredMessage.qml
new file mode 100644
index 0000000..d0b7cc9
--- /dev/null
+++ b/qml/components/messageContent/SponsoredMessage.qml
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2021 Sebastian J. Wolf and other contributors
+
+ This file is part of Fernschreiber.
+
+ Fernschreiber is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Fernschreiber is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Fernschreiber. If not, see .
+*/
+import QtQuick 2.6
+import QtGraphicalEffects 1.0
+import Sailfish.Silica 1.0
+import WerkWolf.Fernschreiber 1.0
+import "../"
+import "../../js/functions.js" as Functions
+
+Column {
+ id: sponsoredMessageColumn
+
+ property var sponsoredMessageData;
+
+ Component.onCompleted: {
+ if (sponsoredMessageData) {
+ if (typeof sponsoredMessageData.link === "undefined") {
+ sponsoredMessageButton.text = qsTr("Go to Channel");
+ sponsoredMessageButton.advertisesChannel = true;
+ } else if (sponsoredMessageData.link['@type'] === "internalLinkTypeMessage") {
+ sponsoredMessageButton.text = qsTr("Go to Message");
+ sponsoredMessageButton.enabled = false;
+ } else {
+ sponsoredMessageButton.text = qsTr("Start Bot");
+ sponsoredMessageButton.enabled = false;
+ }
+ }
+ }
+
+ Button {
+ id: sponsoredMessageButton
+ property bool advertisesChannel: false;
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ }
+ onClicked: {
+ if (advertisesChannel) {
+ tdLibWrapper.createSupergroupChat(sponsoredMessageData.sponsor_chat_id, "openDirectly");
+ }
+ }
+ }
+
+}
diff --git a/qml/components/settingsPage/AccordionItem.qml b/qml/components/settingsPage/AccordionItem.qml
index f893116..e963fec 100644
--- a/qml/components/settingsPage/AccordionItem.qml
+++ b/qml/components/settingsPage/AccordionItem.qml
@@ -78,7 +78,6 @@ Item {
}
horizontalAlignment: Text.AlignRight
truncationMode: TruncationMode.Fade
- font.pixelSize: Theme.fontSizeSmall
color: button.highlighted ? Theme.highlightColor : Theme.primaryColor
textFormat: Text.PlainText
}
diff --git a/qml/js/functions.js b/qml/js/functions.js
index 686ca2d..77556b8 100644
--- a/qml/js/functions.js
+++ b/qml/js/functions.js
@@ -34,7 +34,10 @@ function getUserName(userInformation) {
function getMessageText(message, simple, currentUserId, ignoreEntities) {
- var myself = ( message.sender['@type'] === "messageSenderUser" && message.sender.user_id.toString() === currentUserId.toString() );
+ var myself = false;
+ if ( message['@type'] !== "sponsoredMessage" ) {
+ myself = ( message.sender['@type'] === "messageSenderUser" && message.sender.user_id.toString() === currentUserId.toString() );
+ }
switch(message.content['@type']) {
case 'messageText':
diff --git a/qml/pages/ChatPage.qml b/qml/pages/ChatPage.qml
index a41d512..e41a321 100644
--- a/qml/pages/ChatPage.qml
+++ b/qml/pages/ChatPage.qml
@@ -44,6 +44,7 @@ Page {
property bool isBasicGroup: false;
property bool isSuperGroup: false;
property bool isChannel: false;
+ property bool containsSponsoredMessages: false;
property var chatPartnerInformation;
property var botInformation;
property var chatGroupInformation;
@@ -188,6 +189,10 @@ Page {
return "";
}
+ if (message['@type'] === "sponsoredMessage") {
+ return qsTr("Sponsored Message");
+ }
+
if (message.edit_date > 0) {
messageStatusSuffix += " - " + qsTr("edited");
}
@@ -552,11 +557,13 @@ Page {
}
}
onUserFullInfoUpdated: {
-
if(userId === chatPartnerInformation.id) {
chatPage.botInformation = userFullInfo;
}
}
+ onSponsoredMessagesReceived: {
+ chatPage.containsSponsoredMessages = true;
+ }
}
Connections {
@@ -684,8 +691,10 @@ Page {
}
onTriggered: {
- if(chatInformation.unread_count > 0 && lastQueuedIndex > -1) {
- var messageToRead = chatModel.getMessage(lastQueuedIndex);
+ var messageToRead = chatModel.getMessage(lastQueuedIndex);
+ if (messageToRead['@type'] === "sponsoredMessage") {
+ tdLibWrapper.viewSponsoredMessage(chatInformation.id, messageToRead.id);
+ } else if (chatInformation.unread_count > 0 && lastQueuedIndex > -1) {
if (messageToRead && messageToRead.id) {
tdLibWrapper.viewMessage(chatInformation.id, messageToRead.id, false);
}
@@ -1085,6 +1094,9 @@ Page {
Debug.log("Page is initialized!");
chatPage.isInitialized = true;
chatView.handleScrollPositionChanged();
+ if (chatPage.isChannel) {
+ tdLibWrapper.getChatSponsoredMessages(chatInformation.id);
+ }
}
}
}
@@ -1135,7 +1147,8 @@ Page {
function handleScrollPositionChanged() {
Debug.log("Current position: ", chatView.contentY);
- if (chatOverviewItem.visible && chatInformation.unread_count > 0) {
+ Debug.log("Contains sponsored messages?", chatPage.containsSponsoredMessages);
+ if (chatOverviewItem.visible && ( chatInformation.unread_count > 0 || chatPage.containsSponsoredMessages ) ) {
var bottomIndex = chatView.indexAt(chatView.contentX, ( chatView.contentY + chatView.height - Theme.horizontalPageMargin ));
if (bottomIndex > -1) {
viewMessageTimer.queueViewMessage(bottomIndex)
diff --git a/src/chatmodel.cpp b/src/chatmodel.cpp
index a1c4f44..c5368f9 100644
--- a/src/chatmodel.cpp
+++ b/src/chatmodel.cpp
@@ -221,6 +221,17 @@ QVector ChatModel::MessageData::setInteractionInfo(const QVariantMap &info)
bool ChatModel::MessageData::lessThan(const MessageData *message1, const MessageData *message2)
{
+ bool message1Sponsored = message1->messageData.value("@type") == "sponsoredMessage";
+ bool message2Sponsored = message2->messageData.value("@type") == "sponsoredMessage";
+ if (message1Sponsored && message2Sponsored) {
+ return message1->messageId < message2->messageId;
+ }
+ if (message1Sponsored && !message2Sponsored) {
+ return false;
+ }
+ if (!message1Sponsored && message2Sponsored) {
+ return true;
+ }
return message1->messageId < message2->messageId;
}
@@ -232,6 +243,7 @@ ChatModel::ChatModel(TDLibWrapper *tdLibWrapper) :
{
this->tdLibWrapper = tdLibWrapper;
connect(this->tdLibWrapper, SIGNAL(messagesReceived(QVariantList, int)), this, SLOT(handleMessagesReceived(QVariantList, int)));
+ connect(this->tdLibWrapper, SIGNAL(sponsoredMessagesReceived(QVariantList)), this, SLOT(handleSponsoredMessagesReceived(QVariantList)));
connect(this->tdLibWrapper, SIGNAL(newMessageReceived(qlonglong, QVariantMap)), this, SLOT(handleNewMessageReceived(qlonglong, QVariantMap)));
connect(this->tdLibWrapper, SIGNAL(receivedMessage(qlonglong, qlonglong, QVariantMap)), this, SLOT(handleMessageReceived(qlonglong, qlonglong, QVariantMap)));
connect(this->tdLibWrapper, SIGNAL(chatReadInboxUpdated(QString, QString, int)), this, SLOT(handleChatReadInboxUpdated(QString, QString, int)));
@@ -462,6 +474,23 @@ void ChatModel::handleMessagesReceived(const QVariantList &messages, int totalCo
}
+void ChatModel::handleSponsoredMessagesReceived(const QVariantList &sponsoredMessages)
+{
+ LOG("Handling sponsored messages:" < 0) {
+ QList messagesToBeAdded;
+ for (QVariant sponsoredMessage: sponsoredMessages) {
+ QVariantMap sponsoredMessageData = sponsoredMessage.toMap();
+ const qlonglong messageId = sponsoredMessageData.value(ID).toLongLong();
+ if (messageId && !messageIndexMap.contains(messageId)) {
+ LOG("New sponsored message will be added:" << messageId);
+ messagesToBeAdded.append(new MessageData(sponsoredMessageData, messageId));
+ }
+ }
+ appendMessages(messagesToBeAdded);
+ }
+}
+
void ChatModel::handleNewMessageReceived(qlonglong chatId, const QVariantMap &message)
{
const qlonglong messageId = message.value(ID).toLongLong();
@@ -662,7 +691,14 @@ void ChatModel::insertMessages(const QList newMessages)
appendMessages(newMessages);
} else if (!newMessages.isEmpty()) {
// There is only an append or a prepend, tertium non datur! (probably ;))
- const qlonglong lastKnownId = messages.last()->messageId;
+ qlonglong lastKnownId = -1;
+ for (int i = (messages.size() - 1); i >=0; i-- ) {
+ if (messages.at(i)->messageData.value("@type").toString() == "sponsoredMessage") {
+ continue;
+ } else {
+ lastKnownId = messages.at(i)->messageId;
+ }
+ }
const qlonglong firstNewId = newMessages.first()->messageId;
LOG("Inserting messages, last known ID:" << lastKnownId << ", first new ID:" << firstNewId);
if (lastKnownId < firstNewId) {
diff --git a/src/chatmodel.h b/src/chatmodel.h
index 7424346..55b3c14 100644
--- a/src/chatmodel.h
+++ b/src/chatmodel.h
@@ -63,6 +63,7 @@ signals:
private slots:
void handleMessagesReceived(const QVariantList &messages, int totalCount);
+ void handleSponsoredMessagesReceived(const QVariantList &sponsoredMessages);
void handleNewMessageReceived(qlonglong chatId, const QVariantMap &message);
void handleMessageReceived(qlonglong chatId, qlonglong messageId, const QVariantMap &message);
void handleChatReadInboxUpdated(const QString &chatId, const QString &lastReadInboxMessageId, int unreadCount);
diff --git a/src/tdlibreceiver.cpp b/src/tdlibreceiver.cpp
index 4dde2f8..4909ba4 100644
--- a/src/tdlibreceiver.cpp
+++ b/src/tdlibreceiver.cpp
@@ -101,6 +101,7 @@ TDLibReceiver::TDLibReceiver(void *tdLibClient, QObject *parent) : QThread(paren
handlers.insert("updateSupergroup", &TDLibReceiver::processUpdateSuperGroup);
handlers.insert("updateChatOnlineMemberCount", &TDLibReceiver::processChatOnlineMemberCountUpdated);
handlers.insert("messages", &TDLibReceiver::processMessages);
+ handlers.insert("sponsoredMessages", &TDLibReceiver::processSponsoredMessages);
handlers.insert("updateNewMessage", &TDLibReceiver::processUpdateNewMessage);
handlers.insert("message", &TDLibReceiver::processMessage);
handlers.insert("updateMessageSendSucceeded", &TDLibReceiver::processMessageSendSucceeded);
@@ -356,6 +357,12 @@ void TDLibReceiver::processMessages(const QVariantMap &receivedInformation)
emit messagesReceived(receivedInformation.value(MESSAGES).toList(), receivedInformation.value(TOTAL_COUNT).toInt());
}
+void TDLibReceiver::processSponsoredMessages(const QVariantMap &receivedInformation)
+{
+ LOG("Received sponsored messages");
+ emit sponsoredMessagesReceived(receivedInformation.value("messages").toList());
+}
+
void TDLibReceiver::processUpdateNewMessage(const QVariantMap &receivedInformation)
{
const QVariantMap message = receivedInformation.value(MESSAGE).toMap();
diff --git a/src/tdlibreceiver.h b/src/tdlibreceiver.h
index da090cf..84164e8 100644
--- a/src/tdlibreceiver.h
+++ b/src/tdlibreceiver.h
@@ -56,6 +56,7 @@ signals:
void superGroupUpdated(qlonglong groupId, const QVariantMap &groupInformation);
void chatOnlineMemberCountUpdated(const QString &chatId, int onlineMemberCount);
void messagesReceived(const QVariantList &messages, int totalCount);
+ void sponsoredMessagesReceived(const QVariantList &sponsoredMessages);
void newMessageReceived(qlonglong chatId, const QVariantMap &message);
void messageInformation(qlonglong chatId, qlonglong messageId, const QVariantMap &message);
void messageSendSucceeded(qlonglong messageId, qlonglong oldMessageId, const QVariantMap &message);
@@ -130,6 +131,7 @@ private:
void processUpdateSuperGroup(const QVariantMap &receivedInformation);
void processChatOnlineMemberCountUpdated(const QVariantMap &receivedInformation);
void processMessages(const QVariantMap &receivedInformation);
+ void processSponsoredMessages(const QVariantMap &receivedInformation);
void processUpdateNewMessage(const QVariantMap &receivedInformation);
void processMessage(const QVariantMap &receivedInformation);
void processMessageSendSucceeded(const QVariantMap &receivedInformation);
diff --git a/src/tdlibwrapper.cpp b/src/tdlibwrapper.cpp
index b9873be..1f0c5ef 100644
--- a/src/tdlibwrapper.cpp
+++ b/src/tdlibwrapper.cpp
@@ -118,6 +118,7 @@ void TDLibWrapper::initializeTDLibReciever() {
connect(this->tdLibReceiver, SIGNAL(superGroupUpdated(qlonglong, QVariantMap)), this, SLOT(handleSuperGroupUpdated(qlonglong, QVariantMap)));
connect(this->tdLibReceiver, SIGNAL(chatOnlineMemberCountUpdated(QString, int)), this, SIGNAL(chatOnlineMemberCountUpdated(QString, int)));
connect(this->tdLibReceiver, SIGNAL(messagesReceived(QVariantList, int)), this, SIGNAL(messagesReceived(QVariantList, int)));
+ connect(this->tdLibReceiver, SIGNAL(sponsoredMessagesReceived(QVariantList)), this, SIGNAL(sponsoredMessagesReceived(QVariantList)));
connect(this->tdLibReceiver, SIGNAL(newMessageReceived(qlonglong, QVariantMap)), this, SIGNAL(newMessageReceived(qlonglong, QVariantMap)));
connect(this->tdLibReceiver, SIGNAL(messageInformation(qlonglong, qlonglong, QVariantMap)), this, SLOT(handleMessageInformation(qlonglong, qlonglong, QVariantMap)));
connect(this->tdLibReceiver, SIGNAL(messageSendSucceeded(qlonglong, qlonglong, QVariantMap)), this, SIGNAL(messageSendSucceeded(qlonglong, qlonglong, QVariantMap)));
@@ -335,6 +336,17 @@ void TDLibWrapper::viewMessage(const QString &chatId, const QString &messageId,
this->sendRequest(requestObject);
}
+void TDLibWrapper::viewSponsoredMessage(qlonglong chatId, qlonglong messageId)
+{
+ LOG("Mark sponsored message as viewed" << chatId << messageId);
+ QVariantMap requestObject;
+ requestObject.insert(_TYPE, "viewSponsoredMessage");
+ requestObject.insert(CHAT_ID, chatId);
+ requestObject.insert("sponsored_message_id", messageId);
+ requestObject.insert(_EXTRA, "viewSponsoredMessage");
+ this->sendRequest(requestObject);
+}
+
void TDLibWrapper::pinMessage(const QString &chatId, const QString &messageId, bool disableNotification)
{
LOG("Pin message to chat" << chatId << messageId << disableNotification);
@@ -655,6 +667,16 @@ void TDLibWrapper::getChatPinnedMessage(qlonglong chatId)
this->sendRequest(requestObject);
}
+void TDLibWrapper::getChatSponsoredMessages(qlonglong chatId)
+{
+ LOG("Retrieving sponsored messages" << chatId);
+ QVariantMap requestObject;
+ requestObject.insert(_TYPE, "getChatSponsoredMessages");
+ requestObject.insert(CHAT_ID, chatId);
+ requestObject.insert(_EXTRA, "getChatSponsoredMessages:" + QString::number(chatId));
+ this->sendRequest(requestObject);
+}
+
void TDLibWrapper::setOptionInteger(const QString &optionName, int optionValue)
{
LOG("Setting integer option" << optionName << optionValue);
diff --git a/src/tdlibwrapper.h b/src/tdlibwrapper.h
index 9dac049..6aba8d2 100644
--- a/src/tdlibwrapper.h
+++ b/src/tdlibwrapper.h
@@ -158,6 +158,7 @@ public:
Q_INVOKABLE void leaveChat(const QString &chatId);
Q_INVOKABLE void getChatHistory(qlonglong chatId, qlonglong fromMessageId = 0, int offset = -1, int limit = 50, bool onlyLocal = false);
Q_INVOKABLE void viewMessage(const QString &chatId, const QString &messageId, bool force);
+ Q_INVOKABLE void viewSponsoredMessage(qlonglong chatId, qlonglong messageId);
Q_INVOKABLE void pinMessage(const QString &chatId, const QString &messageId, bool disableNotification = false);
Q_INVOKABLE void unpinMessage(const QString &chatId, const QString &messageId);
Q_INVOKABLE void sendTextMessage(const QString &chatId, const QString &message, const QString &replyToMessageId = "0");
@@ -172,6 +173,7 @@ public:
Q_INVOKABLE void getMessage(qlonglong chatId, qlonglong messageId);
Q_INVOKABLE void getCallbackQueryAnswer(const QString &chatId, const QString &messageId, const QVariantMap &payload);
Q_INVOKABLE void getChatPinnedMessage(qlonglong chatId);
+ Q_INVOKABLE void getChatSponsoredMessages(qlonglong chatId);
Q_INVOKABLE void setOptionInteger(const QString &optionName, int optionValue);
Q_INVOKABLE void setOptionBoolean(const QString &optionName, bool optionValue);
Q_INVOKABLE void setChatNotificationSettings(const QString &chatId, const QVariantMap ¬ificationSettings);
@@ -260,6 +262,7 @@ signals:
void superGroupUpdated(qlonglong groupId);
void chatOnlineMemberCountUpdated(const QString &chatId, int onlineMemberCount);
void messagesReceived(const QVariantList &messages, int totalCount);
+ void sponsoredMessagesReceived(const QVariantList &sponsoredMessages);
void newMessageReceived(qlonglong chatId, const QVariantMap &message);
void copyToDownloadsSuccessful(const QString &fileName, const QString &filePath);
void copyToDownloadsError(const QString &fileName, const QString &filePath);
diff --git a/tdlib/include/td/telegram/Client.h b/tdlib/include/td/telegram/Client.h
index abc5048..1e3bc29 100644
--- a/tdlib/include/td/telegram/Client.h
+++ b/tdlib/include/td/telegram/Client.h
@@ -1,5 +1,5 @@
//
-// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2020
+// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021
//
// 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)
@@ -119,12 +119,12 @@ class Client final {
/**
* Move constructor.
*/
- Client(Client &&other);
+ Client(Client &&other) noexcept;
/**
* Move assignment operator.
*/
- Client &operator=(Client &&other);
+ Client &operator=(Client &&other) noexcept;
private:
class Impl;
@@ -238,6 +238,27 @@ class ClientManager final {
*/
static td_api::object_ptr execute(td_api::object_ptr &&request);
+ /**
+ * A type of callback function that will be called when a message is added to the internal TDLib log.
+ *
+ * \param verbosity_level Log verbosity level with which the message was added (-1 - 1024).
+ * If 0, then TDLib will crash as soon as the callback returns.
+ * None of the TDLib methods can be called from the callback.
+ * \param message Null-terminated string with the message added to the log.
+ */
+ using LogMessageCallbackPtr = void (*)(int verbosity_level, const char *message);
+
+ /**
+ * Sets the callback that will be called when a message is added to the internal TDLib log.
+ * None of the TDLib methods can be called from the callback.
+ * By default the callback is not set.
+ *
+ * \param[in] max_verbosity_level The maximum verbosity level of messages for which the callback will be called.
+ * \param[in] callback Callback that will be called when a message is added to the internal TDLib log.
+ * Pass nullptr to remove the callback.
+ */
+ static void set_log_message_callback(int max_verbosity_level, LogMessageCallbackPtr callback);
+
/**
* Destroys the client manager and all TDLib client instances managed by it.
*/
@@ -246,12 +267,12 @@ class ClientManager final {
/**
* Move constructor.
*/
- ClientManager(ClientManager &&other);
+ ClientManager(ClientManager &&other) noexcept;
/**
* Move assignment operator.
*/
- ClientManager &operator=(ClientManager &&other);
+ ClientManager &operator=(ClientManager &&other) noexcept;
/**
* Returns a pointer to a singleton ClientManager instance.
diff --git a/tdlib/include/td/telegram/Log.h b/tdlib/include/td/telegram/Log.h
index 14923ab..7573c5b 100644
--- a/tdlib/include/td/telegram/Log.h
+++ b/tdlib/include/td/telegram/Log.h
@@ -1,5 +1,5 @@
//
-// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2020
+// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021
//
// 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)
@@ -21,7 +21,7 @@ namespace td {
* Interface for managing the internal logging of TDLib.
* By default TDLib writes logs to stderr or an OS specific log and uses a verbosity level of 5.
* These functions are deprecated since TDLib 1.4.0 in favor of the td::td_api::setLogVerbosityLevel,
- * td::td_api::setLogStream and other synchronous requests for managing the intrenal TDLib logging.
+ * td::td_api::setLogStream and other synchronous requests for managing the internal TDLib logging.
*/
class Log {
public:
@@ -76,6 +76,7 @@ class Log {
* The TDLib will crash as soon as callback returns.
* By default the callback is not set.
*
+ * \deprecated Use ClientManager::set_log_message_callback instead.
* \param[in] callback Callback that will be called when a fatal error happens.
* Pass nullptr to remove the callback.
*/
diff --git a/tdlib/include/td/telegram/td_api.h b/tdlib/include/td/telegram/td_api.h
index 6053610..20ea31f 100644
--- a/tdlib/include/td/telegram/td_api.h
+++ b/tdlib/include/td/telegram/td_api.h
@@ -50,12 +50,28 @@ std::string to_string(const object_ptr &value) {
return to_string(*value);
}
+template
+std::string to_string(const std::vector> &values) {
+ std::string result = "{\n";
+ for (const auto &value : values) {
+ if (value == nullptr) {
+ result += "null\n";
+ } else {
+ result += to_string(*value);
+ }
+ }
+ result += "}\n";
+ return result;
+}
+
class accountTtl;
class address;
class animatedChatPhoto;
+class animatedEmoji;
+
class animation;
class animations;
@@ -90,7 +106,9 @@ class basicGroupFullInfo;
class botCommand;
-class botInfo;
+class BotCommandScope;
+
+class botCommands;
class call;
@@ -138,8 +156,24 @@ class chatFilterInfo;
class chatInviteLink;
+class chatInviteLinkCount;
+
+class chatInviteLinkCounts;
+
class chatInviteLinkInfo;
+class chatInviteLinkMember;
+
+class chatInviteLinkMembers;
+
+class chatInviteLinks;
+
+class chatJoinRequest;
+
+class chatJoinRequests;
+
+class chatJoinRequestsInfo;
+
class ChatList;
class chatLists;
@@ -182,6 +216,8 @@ class chatStatisticsMessageInteractionInfo;
class chatStatisticsMessageSenderInfo;
+class chatTheme;
+
class ChatType;
class chats;
@@ -190,6 +226,12 @@ class chatsNearby;
class CheckChatUsernameResult;
+class CheckStickerSetNameResult;
+
+class closedVectorPath;
+
+class colorReplacement;
+
class connectedWebsite;
class connectedWebsites;
@@ -250,6 +292,20 @@ class gameHighScore;
class gameHighScores;
+class groupCall;
+
+class groupCallId;
+
+class groupCallParticipant;
+
+class groupCallParticipantVideoInfo;
+
+class groupCallRecentSpeaker;
+
+class GroupCallVideoQuality;
+
+class groupCallVideoSourceGroup;
+
class hashtags;
class httpUrl;
@@ -292,6 +348,8 @@ class InputSticker;
class inputThumbnail;
+class InternalLinkType;
+
class invoice;
class jsonObjectMember;
@@ -332,10 +390,16 @@ class maskPosition;
class message;
+class messageCalendar;
+
+class messageCalendarDay;
+
class MessageContent;
class messageCopyOptions;
+class MessageFileType;
+
class messageForwardInfo;
class MessageForwardOrigin;
@@ -346,6 +410,10 @@ class messageLink;
class messageLinkInfo;
+class messagePosition;
+
+class messagePositions;
+
class messageReplyInfo;
class MessageSchedulingState;
@@ -424,6 +492,8 @@ class passwordState;
class paymentForm;
+class paymentFormTheme;
+
class paymentReceipt;
class paymentResult;
@@ -442,6 +512,8 @@ class photo;
class photoSize;
+class point;
+
class poll;
class pollOption;
@@ -472,6 +544,8 @@ class remoteFile;
class ReplyMarkup;
+class ResetPasswordResult;
+
class RichText;
class savedCredentials;
@@ -492,6 +566,10 @@ class sessions;
class shippingOption;
+class sponsoredMessage;
+
+class sponsoredMessages;
+
class StatisticalGraph;
class statisticalValue;
@@ -558,6 +636,8 @@ class TextEntityType;
class TextParseMode;
+class themeSettings;
+
class thumbnail;
class ThumbnailFormat;
@@ -586,10 +666,14 @@ class users;
class validatedOrderInfo;
+class VectorPathCommand;
+
class venue;
class video;
+class videoChat;
+
class videoNote;
class voiceNote;
@@ -663,6 +747,24 @@ class animatedChatPhoto final : public Object {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class animatedEmoji final : public Object {
+ public:
+ object_ptr sticker_;
+ array> color_replacements_;
+ object_ptr sound_;
+
+ animatedEmoji();
+
+ animatedEmoji(object_ptr &&sticker_, array> &&color_replacements_, object_ptr &&sound_);
+
+ static const std::int32_t ID = 1130906050;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class animation final : public Object {
public:
int32 duration_;
@@ -1077,6 +1179,22 @@ class backgroundFillGradient final : public BackgroundFill {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class backgroundFillFreeformGradient final : public BackgroundFill {
+ public:
+ array colors_;
+
+ backgroundFillFreeformGradient();
+
+ explicit backgroundFillFreeformGradient(array &&colors_);
+
+ static const std::int32_t ID = -1145469255;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class BackgroundType: public Object {
public:
};
@@ -1102,13 +1220,14 @@ class backgroundTypePattern final : public BackgroundType {
public:
object_ptr fill_;
int32 intensity_;
+ bool is_inverted_;
bool is_moving_;
backgroundTypePattern();
- backgroundTypePattern(object_ptr &&fill_, int32 intensity_, bool is_moving_);
+ backgroundTypePattern(object_ptr &&fill_, int32 intensity_, bool is_inverted_, bool is_moving_);
- static const std::int32_t ID = 649993914;
+ static const std::int32_t ID = 1290213117;
std::int32_t get_id() const final {
return ID;
}
@@ -1184,17 +1303,17 @@ class bankCardInfo final : public Object {
class basicGroup final : public Object {
public:
- int32 id_;
+ int53 id_;
int32 member_count_;
object_ptr status_;
bool is_active_;
- int32 upgraded_to_supergroup_id_;
+ int53 upgraded_to_supergroup_id_;
basicGroup();
- basicGroup(int32 id_, int32 member_count_, object_ptr &&status_, bool is_active_, int32 upgraded_to_supergroup_id_);
+ basicGroup(int53 id_, int32 member_count_, object_ptr &&status_, bool is_active_, int53 upgraded_to_supergroup_id_);
- static const std::int32_t ID = -317839045;
+ static const std::int32_t ID = -194767217;
std::int32_t get_id() const final {
return ID;
}
@@ -1206,15 +1325,16 @@ class basicGroupFullInfo final : public Object {
public:
object_ptr photo_;
string description_;
- int32 creator_user_id_;
+ int53 creator_user_id_;
array> members_;
- string invite_link_;
+ object_ptr invite_link_;
+ array> bot_commands_;
basicGroupFullInfo();
- basicGroupFullInfo(object_ptr &&photo_, string const &description_, int32 creator_user_id_, array> &&members_, string const &invite_link_);
+ basicGroupFullInfo(object_ptr &&photo_, string const &description_, int53 creator_user_id_, array> &&members_, object_ptr &&invite_link_, array> &&bot_commands_);
- static const std::int32_t ID = -127204719;
+ static const std::int32_t ID = 2022233397;
std::int32_t get_id() const final {
return ID;
}
@@ -1239,16 +1359,121 @@ class botCommand final : public Object {
void store(TlStorerToString &s, const char *field_name) const final;
};
-class botInfo final : public Object {
+class BotCommandScope: public Object {
public:
- string description_;
+};
+
+class botCommandScopeDefault final : public BotCommandScope {
+ public:
+
+ botCommandScopeDefault();
+
+ static const std::int32_t ID = 795652779;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class botCommandScopeAllPrivateChats final : public BotCommandScope {
+ public:
+
+ botCommandScopeAllPrivateChats();
+
+ static const std::int32_t ID = -344889543;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class botCommandScopeAllGroupChats final : public BotCommandScope {
+ public:
+
+ botCommandScopeAllGroupChats();
+
+ static const std::int32_t ID = -981088162;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class botCommandScopeAllChatAdministrators final : public BotCommandScope {
+ public:
+
+ botCommandScopeAllChatAdministrators();
+
+ static const std::int32_t ID = 1998329169;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class botCommandScopeChat final : public BotCommandScope {
+ public:
+ int53 chat_id_;
+
+ botCommandScopeChat();
+
+ explicit botCommandScopeChat(int53 chat_id_);
+
+ static const std::int32_t ID = -430234971;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class botCommandScopeChatAdministrators final : public BotCommandScope {
+ public:
+ int53 chat_id_;
+
+ botCommandScopeChatAdministrators();
+
+ explicit botCommandScopeChatAdministrators(int53 chat_id_);
+
+ static const std::int32_t ID = 1119682126;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class botCommandScopeChatMember final : public BotCommandScope {
+ public:
+ int53 chat_id_;
+ int53 user_id_;
+
+ botCommandScopeChatMember();
+
+ botCommandScopeChatMember(int53 chat_id_, int53 user_id_);
+
+ static const std::int32_t ID = -211380494;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class botCommands final : public Object {
+ public:
+ int53 bot_user_id_;
array> commands_;
- botInfo();
+ botCommands();
- botInfo(string const &description_, array> &&commands_);
+ botCommands(int53 bot_user_id_, array> &&commands_);
- static const std::int32_t ID = 1296528907;
+ static const std::int32_t ID = 1741364468;
std::int32_t get_id() const final {
return ID;
}
@@ -1259,16 +1484,16 @@ class botInfo final : public Object {
class call final : public Object {
public:
int32 id_;
- int32 user_id_;
+ int53 user_id_;
bool is_outgoing_;
bool is_video_;
object_ptr state_;
call();
- call(int32 id_, int32 user_id_, bool is_outgoing_, bool is_video_, object_ptr &&state_);
+ call(int32 id_, int53 user_id_, bool is_outgoing_, bool is_video_, object_ptr &&state_);
- static const std::int32_t ID = 1504070790;
+ static const std::int32_t ID = 920360804;
std::int32_t get_id() const final {
return ID;
}
@@ -1817,16 +2042,20 @@ class chat final : public Object {
int53 last_read_outbox_message_id_;
int32 unread_mention_count_;
object_ptr notification_settings_;
+ int32 message_ttl_setting_;
+ string theme_name_;
object_ptr action_bar_;
+ object_ptr video_chat_;
+ object_ptr pending_join_requests_;
int53 reply_markup_message_id_;
object_ptr draft_message_;
string client_data_;
chat();
- chat(int53 id_, object_ptr &&type_, string const &title_, object_ptr &&photo_, object_ptr &&permissions_, object_ptr &&last_message_, array> &&positions_, bool is_marked_as_unread_, bool is_blocked_, bool has_scheduled_messages_, bool can_be_deleted_only_for_self_, bool can_be_deleted_for_all_users_, bool can_be_reported_, bool default_disable_notification_, int32 unread_count_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, int32 unread_mention_count_, object_ptr &¬ification_settings_, object_ptr &&action_bar_, int53 reply_markup_message_id_, object_ptr &&draft_message_, string const &client_data_);
+ chat(int53 id_, object_ptr &&type_, string const &title_, object_ptr &&photo_, object_ptr &&permissions_, object_ptr &&last_message_, array> &&positions_, bool is_marked_as_unread_, bool is_blocked_, bool has_scheduled_messages_, bool can_be_deleted_only_for_self_, bool can_be_deleted_for_all_users_, bool can_be_reported_, bool default_disable_notification_, int32 unread_count_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, int32 unread_mention_count_, object_ptr &¬ification_settings_, int32 message_ttl_setting_, string const &theme_name_, object_ptr &&action_bar_, object_ptr &&video_chat_, object_ptr &&pending_join_requests_, int53 reply_markup_message_id_, object_ptr &&draft_message_, string const &client_data_);
- static const std::int32_t ID = 1811058223;
+ static const std::int32_t ID = -655973775;
std::int32_t get_id() const final {
return ID;
}
@@ -1941,6 +2170,19 @@ class chatActionUploadingDocument final : public ChatAction {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class chatActionChoosingSticker final : public ChatAction {
+ public:
+
+ chatActionChoosingSticker();
+
+ static const std::int32_t ID = 372753697;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class chatActionChoosingLocation final : public ChatAction {
public:
@@ -2009,6 +2251,22 @@ class chatActionUploadingVideoNote final : public ChatAction {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class chatActionWatchingAnimations final : public ChatAction {
+ public:
+ string emoji_;
+
+ chatActionWatchingAnimations();
+
+ explicit chatActionWatchingAnimations(string const &emoji_);
+
+ static const std::int32_t ID = 2052990641;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class chatActionCancel final : public ChatAction {
public:
@@ -2055,6 +2313,19 @@ class chatActionBarReportUnrelatedLocation final : public ChatActionBar {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class chatActionBarInviteMembers final : public ChatActionBar {
+ public:
+
+ chatActionBarInviteMembers();
+
+ static const std::int32_t ID = 1985313904;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class chatActionBarReportAddBlock final : public ChatActionBar {
public:
bool can_unarchive_;
@@ -2100,15 +2371,15 @@ class chatActionBarSharePhoneNumber final : public ChatActionBar {
class chatAdministrator final : public Object {
public:
- int32 user_id_;
+ int53 user_id_;
string custom_title_;
bool is_owner_;
chatAdministrator();
- chatAdministrator(int32 user_id_, string const &custom_title_, bool is_owner_);
+ chatAdministrator(int53 user_id_, string const &custom_title_, bool is_owner_);
- static const std::int32_t ID = 487220942;
+ static const std::int32_t ID = 1920449836;
std::int32_t get_id() const final {
return ID;
}
@@ -2136,14 +2407,14 @@ class chatEvent final : public Object {
public:
int64 id_;
int32 date_;
- int32 user_id_;
+ int53 user_id_;
object_ptr action_;
chatEvent();
- chatEvent(int64 id_, int32 date_, int32 user_id_, object_ptr &&action_);
+ chatEvent(int64 id_, int32 date_, int53 user_id_, object_ptr &&action_);
- static const std::int32_t ID = -609912404;
+ static const std::int32_t ID = -99101703;
std::int32_t get_id() const final {
return ID;
}
@@ -2249,6 +2520,39 @@ class chatEventMemberJoined final : public ChatEventAction {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class chatEventMemberJoinedByInviteLink final : public ChatEventAction {
+ public:
+ object_ptr invite_link_;
+
+ chatEventMemberJoinedByInviteLink();
+
+ explicit chatEventMemberJoinedByInviteLink(object_ptr &&invite_link_);
+
+ static const std::int32_t ID = -253307459;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatEventMemberJoinedByRequest final : public ChatEventAction {
+ public:
+ int53 approver_user_id_;
+ object_ptr invite_link_;
+
+ chatEventMemberJoinedByRequest();
+
+ chatEventMemberJoinedByRequest(int53 approver_user_id_, object_ptr &&invite_link_);
+
+ static const std::int32_t ID = -1647804865;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class chatEventMemberLeft final : public ChatEventAction {
public:
@@ -2264,14 +2568,14 @@ class chatEventMemberLeft final : public ChatEventAction {
class chatEventMemberInvited final : public ChatEventAction {
public:
- int32 user_id_;
+ int53 user_id_;
object_ptr status_;
chatEventMemberInvited();
- chatEventMemberInvited(int32 user_id_, object_ptr &&status_);
+ chatEventMemberInvited(int53 user_id_, object_ptr &&status_);
- static const std::int32_t ID = -2093688706;
+ static const std::int32_t ID = 953663433;
std::int32_t get_id() const final {
return ID;
}
@@ -2281,15 +2585,15 @@ class chatEventMemberInvited final : public ChatEventAction {
class chatEventMemberPromoted final : public ChatEventAction {
public:
- int32 user_id_;
+ int53 user_id_;
object_ptr old_status_;
object_ptr new_status_;
chatEventMemberPromoted();
- chatEventMemberPromoted(int32 user_id_, object_ptr &&old_status_, object_ptr &&new_status_);
+ chatEventMemberPromoted(int53 user_id_, object_ptr &&old_status_, object_ptr &&new_status_);
- static const std::int32_t ID = 1887176186;
+ static const std::int32_t ID = 525297761;
std::int32_t get_id() const final {
return ID;
}
@@ -2299,15 +2603,15 @@ class chatEventMemberPromoted final : public ChatEventAction {
class chatEventMemberRestricted final : public ChatEventAction {
public:
- int32 user_id_;
+ object_ptr member_id_;
object_ptr old_status_;
object_ptr new_status_;
chatEventMemberRestricted();
- chatEventMemberRestricted(int32 user_id_, object_ptr &&old_status_, object_ptr &&new_status_);
+ chatEventMemberRestricted(object_ptr &&member_id_, object_ptr &&old_status_, object_ptr &&new_status_);
- static const std::int32_t ID = 584946294;
+ static const std::int32_t ID = 1603608069;
std::int32_t get_id() const final {
return ID;
}
@@ -2450,6 +2754,23 @@ class chatEventSlowModeDelayChanged final : public ChatEventAction {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class chatEventMessageTtlSettingChanged final : public ChatEventAction {
+ public:
+ int32 old_message_ttl_setting_;
+ int32 new_message_ttl_setting_;
+
+ chatEventMessageTtlSettingChanged();
+
+ chatEventMessageTtlSettingChanged(int32 old_message_ttl_setting_, int32 new_message_ttl_setting_);
+
+ static const std::int32_t ID = -1340179286;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class chatEventSignMessagesToggled final : public ChatEventAction {
public:
bool sign_messages_;
@@ -2516,6 +2837,137 @@ class chatEventIsAllHistoryAvailableToggled final : public ChatEventAction {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class chatEventInviteLinkEdited final : public ChatEventAction {
+ public:
+ object_ptr old_invite_link_;
+ object_ptr new_invite_link_;
+
+ chatEventInviteLinkEdited();
+
+ chatEventInviteLinkEdited(object_ptr &&old_invite_link_, object_ptr &&new_invite_link_);
+
+ static const std::int32_t ID = -460190366;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatEventInviteLinkRevoked final : public ChatEventAction {
+ public:
+ object_ptr invite_link_;
+
+ chatEventInviteLinkRevoked();
+
+ explicit chatEventInviteLinkRevoked(object_ptr &&invite_link_);
+
+ static const std::int32_t ID = -1579417629;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatEventInviteLinkDeleted final : public ChatEventAction {
+ public:
+ object_ptr invite_link_;
+
+ chatEventInviteLinkDeleted();
+
+ explicit chatEventInviteLinkDeleted(object_ptr &&invite_link_);
+
+ static const std::int32_t ID = -1394974361;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatEventVideoChatCreated final : public ChatEventAction {
+ public:
+ int32 group_call_id_;
+
+ chatEventVideoChatCreated();
+
+ explicit chatEventVideoChatCreated(int32 group_call_id_);
+
+ static const std::int32_t ID = 1822853755;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatEventVideoChatDiscarded final : public ChatEventAction {
+ public:
+ int32 group_call_id_;
+
+ chatEventVideoChatDiscarded();
+
+ explicit chatEventVideoChatDiscarded(int32 group_call_id_);
+
+ static const std::int32_t ID = -774616761;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatEventVideoChatParticipantIsMutedToggled final : public ChatEventAction {
+ public:
+ object_ptr participant_id_;
+ bool is_muted_;
+
+ chatEventVideoChatParticipantIsMutedToggled();
+
+ chatEventVideoChatParticipantIsMutedToggled(object_ptr &&participant_id_, bool is_muted_);
+
+ static const std::int32_t ID = 521165047;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatEventVideoChatParticipantVolumeLevelChanged final : public ChatEventAction {
+ public:
+ object_ptr participant_id_;
+ int32 volume_level_;
+
+ chatEventVideoChatParticipantVolumeLevelChanged();
+
+ chatEventVideoChatParticipantVolumeLevelChanged(object_ptr &&participant_id_, int32 volume_level_);
+
+ static const std::int32_t ID = 1131385534;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatEventVideoChatMuteNewParticipantsToggled final : public ChatEventAction {
+ public:
+ bool mute_new_participants_;
+
+ chatEventVideoChatMuteNewParticipantsToggled();
+
+ explicit chatEventVideoChatMuteNewParticipantsToggled(bool mute_new_participants_);
+
+ static const std::int32_t ID = -126547970;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class chatEventLogFilters final : public Object {
public:
bool message_edits_;
@@ -2528,12 +2980,14 @@ class chatEventLogFilters final : public Object {
bool member_restrictions_;
bool info_changes_;
bool setting_changes_;
+ bool invite_link_changes_;
+ bool video_chat_changes_;
chatEventLogFilters();
- chatEventLogFilters(bool message_edits_, bool message_deletions_, bool message_pins_, bool member_joins_, bool member_leaves_, bool member_invites_, bool member_promotions_, bool member_restrictions_, bool info_changes_, bool setting_changes_);
+ chatEventLogFilters(bool message_edits_, bool message_deletions_, bool message_pins_, bool member_joins_, bool member_leaves_, bool member_invites_, bool member_promotions_, bool member_restrictions_, bool info_changes_, bool setting_changes_, bool invite_link_changes_, bool video_chat_changes_);
- static const std::int32_t ID = 941939684;
+ static const std::int32_t ID = 1251197299;
std::int32_t get_id() const final {
return ID;
}
@@ -2606,12 +3060,57 @@ class chatFilterInfo final : public Object {
class chatInviteLink final : public Object {
public:
string invite_link_;
+ string name_;
+ int53 creator_user_id_;
+ int32 date_;
+ int32 edit_date_;
+ int32 expire_date_;
+ int32 member_limit_;
+ int32 member_count_;
+ int32 pending_join_request_count_;
+ bool creates_join_request_;
+ bool is_primary_;
+ bool is_revoked_;
chatInviteLink();
- explicit chatInviteLink(string const &invite_link_);
+ chatInviteLink(string const &invite_link_, string const &name_, int53 creator_user_id_, int32 date_, int32 edit_date_, int32 expire_date_, int32 member_limit_, int32 member_count_, int32 pending_join_request_count_, bool creates_join_request_, bool is_primary_, bool is_revoked_);
- static const std::int32_t ID = -882072492;
+ static const std::int32_t ID = 27751711;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatInviteLinkCount final : public Object {
+ public:
+ int53 user_id_;
+ int32 invite_link_count_;
+ int32 revoked_invite_link_count_;
+
+ chatInviteLinkCount();
+
+ chatInviteLinkCount(int53 user_id_, int32 invite_link_count_, int32 revoked_invite_link_count_);
+
+ static const std::int32_t ID = -1021999210;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatInviteLinkCounts final : public Object {
+ public:
+ array> invite_link_counts_;
+
+ chatInviteLinkCounts();
+
+ explicit chatInviteLinkCounts(array> &&invite_link_counts_);
+
+ static const std::int32_t ID = 920326637;
std::int32_t get_id() const final {
return ID;
}
@@ -2626,15 +3125,121 @@ class chatInviteLinkInfo final : public Object {
object_ptr type_;
string title_;
object_ptr photo_;
+ string description_;
int32 member_count_;
- array member_user_ids_;
+ array member_user_ids_;
+ bool creates_join_request_;
bool is_public_;
chatInviteLinkInfo();
- chatInviteLinkInfo(int53 chat_id_, int32 accessible_for_, object_ptr &&type_, string const &title_, object_ptr &&photo_, int32 member_count_, array &&member_user_ids_, bool is_public_);
+ chatInviteLinkInfo(int53 chat_id_, int32 accessible_for_, object_ptr &&type_, string const &title_, object_ptr &&photo_, string const &description_, int32 member_count_, array &&member_user_ids_, bool creates_join_request_, bool is_public_);
- static const std::int32_t ID = 910695551;
+ static const std::int32_t ID = 546234276;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatInviteLinkMember final : public Object {
+ public:
+ int53 user_id_;
+ int32 joined_chat_date_;
+ int53 approver_user_id_;
+
+ chatInviteLinkMember();
+
+ chatInviteLinkMember(int53 user_id_, int32 joined_chat_date_, int53 approver_user_id_);
+
+ static const std::int32_t ID = -1409060582;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatInviteLinkMembers final : public Object {
+ public:
+ int32 total_count_;
+ array> members_;
+
+ chatInviteLinkMembers();
+
+ chatInviteLinkMembers(int32 total_count_, array> &&members_);
+
+ static const std::int32_t ID = 315635051;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatInviteLinks final : public Object {
+ public:
+ int32 total_count_;
+ array> invite_links_;
+
+ chatInviteLinks();
+
+ chatInviteLinks(int32 total_count_, array> &&invite_links_);
+
+ static const std::int32_t ID = 112891427;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatJoinRequest final : public Object {
+ public:
+ int53 user_id_;
+ int32 date_;
+ string bio_;
+
+ chatJoinRequest();
+
+ chatJoinRequest(int53 user_id_, int32 date_, string const &bio_);
+
+ static const std::int32_t ID = 59341416;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatJoinRequests final : public Object {
+ public:
+ int32 total_count_;
+ array> requests_;
+
+ chatJoinRequests();
+
+ chatJoinRequests(int32 total_count_, array> &&requests_);
+
+ static const std::int32_t ID = 1291680519;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatJoinRequestsInfo final : public Object {
+ public:
+ int32 total_count_;
+ array user_ids_;
+
+ chatJoinRequestsInfo();
+
+ chatJoinRequestsInfo(int32 total_count_, array &&user_ids_);
+
+ static const std::int32_t ID = 888534463;
std::int32_t get_id() const final {
return ID;
}
@@ -2723,17 +3328,16 @@ class chatLocation final : public Object {
class chatMember final : public Object {
public:
- int32 user_id_;
- int32 inviter_user_id_;
+ object_ptr member_id_;
+ int53 inviter_user_id_;
int32 joined_chat_date_;
object_ptr status_;
- object_ptr bot_info_;
chatMember();
- chatMember(int32 user_id_, int32 inviter_user_id_, int32 joined_chat_date_, object_ptr &&status_, object_ptr &&bot_info_);
+ chatMember(object_ptr &&member_id_, int53 inviter_user_id_, int32 joined_chat_date_, object_ptr &&status_);
- static const std::int32_t ID = -806137076;
+ static const std::int32_t ID = 1829953909;
std::int32_t get_id() const final {
return ID;
}
@@ -2767,6 +3371,7 @@ class chatMemberStatusAdministrator final : public ChatMemberStatus {
public:
string custom_title_;
bool can_be_edited_;
+ bool can_manage_chat_;
bool can_change_info_;
bool can_post_messages_;
bool can_edit_messages_;
@@ -2775,13 +3380,14 @@ class chatMemberStatusAdministrator final : public ChatMemberStatus {
bool can_restrict_members_;
bool can_pin_messages_;
bool can_promote_members_;
+ bool can_manage_video_chats_;
bool is_anonymous_;
chatMemberStatusAdministrator();
- chatMemberStatusAdministrator(string const &custom_title_, bool can_be_edited_, bool can_change_info_, bool can_post_messages_, bool can_edit_messages_, bool can_delete_messages_, bool can_invite_users_, bool can_restrict_members_, bool can_pin_messages_, bool can_promote_members_, bool is_anonymous_);
+ chatMemberStatusAdministrator(string const &custom_title_, bool can_be_edited_, bool can_manage_chat_, bool can_change_info_, bool can_post_messages_, bool can_edit_messages_, bool can_delete_messages_, bool can_invite_users_, bool can_restrict_members_, bool can_pin_messages_, bool can_promote_members_, bool can_manage_video_chats_, bool is_anonymous_);
- static const std::int32_t ID = 222495835;
+ static const std::int32_t ID = 82243562;
std::int32_t get_id() const final {
return ID;
}
@@ -3053,13 +3659,14 @@ class chatPhotoInfo final : public Object {
public:
object_ptr small_;
object_ptr big_;
+ object_ptr minithumbnail_;
bool has_animation_;
chatPhotoInfo();
- chatPhotoInfo(object_ptr &&small_, object_ptr &&big_, bool has_animation_);
+ chatPhotoInfo(object_ptr &&small_, object_ptr &&big_, object_ptr &&minithumbnail_, bool has_animation_);
- static const std::int32_t ID = 404510091;
+ static const std::int32_t ID = 167058358;
std::int32_t get_id() const final {
return ID;
}
@@ -3185,15 +3792,25 @@ class chatReportReasonUnrelatedLocation final : public ChatReportReason {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class chatReportReasonFake final : public ChatReportReason {
+ public:
+
+ chatReportReasonFake();
+
+ static const std::int32_t ID = -1713230446;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class chatReportReasonCustom final : public ChatReportReason {
public:
- string text_;
chatReportReasonCustom();
- explicit chatReportReasonCustom(string const &text_);
-
- static const std::int32_t ID = 544575454;
+ static const std::int32_t ID = 1288925974;
std::int32_t get_id() const final {
return ID;
}
@@ -3302,16 +3919,16 @@ class chatStatisticsChannel final : public ChatStatistics {
class chatStatisticsAdministratorActionsInfo final : public Object {
public:
- int32 user_id_;
+ int53 user_id_;
int32 deleted_message_count_;
int32 banned_user_count_;
int32 restricted_user_count_;
chatStatisticsAdministratorActionsInfo();
- chatStatisticsAdministratorActionsInfo(int32 user_id_, int32 deleted_message_count_, int32 banned_user_count_, int32 restricted_user_count_);
+ chatStatisticsAdministratorActionsInfo(int53 user_id_, int32 deleted_message_count_, int32 banned_user_count_, int32 restricted_user_count_);
- static const std::int32_t ID = 1988384904;
+ static const std::int32_t ID = -406467202;
std::int32_t get_id() const final {
return ID;
}
@@ -3321,14 +3938,14 @@ class chatStatisticsAdministratorActionsInfo final : public Object {
class chatStatisticsInviterInfo final : public Object {
public:
- int32 user_id_;
+ int53 user_id_;
int32 added_member_count_;
chatStatisticsInviterInfo();
- chatStatisticsInviterInfo(int32 user_id_, int32 added_member_count_);
+ chatStatisticsInviterInfo(int53 user_id_, int32 added_member_count_);
- static const std::int32_t ID = -399517859;
+ static const std::int32_t ID = 629396619;
std::int32_t get_id() const final {
return ID;
}
@@ -3356,15 +3973,33 @@ class chatStatisticsMessageInteractionInfo final : public Object {
class chatStatisticsMessageSenderInfo final : public Object {
public:
- int32 user_id_;
+ int53 user_id_;
int32 sent_message_count_;
int32 average_character_count_;
chatStatisticsMessageSenderInfo();
- chatStatisticsMessageSenderInfo(int32 user_id_, int32 sent_message_count_, int32 average_character_count_);
+ chatStatisticsMessageSenderInfo(int53 user_id_, int32 sent_message_count_, int32 average_character_count_);
- static const std::int32_t ID = 1716075179;
+ static const std::int32_t ID = 1762295371;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class chatTheme final : public Object {
+ public:
+ string name_;
+ object_ptr light_settings_;
+ object_ptr dark_settings_;
+
+ chatTheme();
+
+ chatTheme(string const &name_, object_ptr &&light_settings_, object_ptr &&dark_settings_);
+
+ static const std::int32_t ID = -113218503;
std::int32_t get_id() const final {
return ID;
}
@@ -3378,13 +4013,13 @@ class ChatType: public Object {
class chatTypePrivate final : public ChatType {
public:
- int32 user_id_;
+ int53 user_id_;
chatTypePrivate();
- explicit chatTypePrivate(int32 user_id_);
+ explicit chatTypePrivate(int53 user_id_);
- static const std::int32_t ID = 1700720838;
+ static const std::int32_t ID = 1579049844;
std::int32_t get_id() const final {
return ID;
}
@@ -3394,13 +4029,13 @@ class chatTypePrivate final : public ChatType {
class chatTypeBasicGroup final : public ChatType {
public:
- int32 basic_group_id_;
+ int53 basic_group_id_;
chatTypeBasicGroup();
- explicit chatTypeBasicGroup(int32 basic_group_id_);
+ explicit chatTypeBasicGroup(int53 basic_group_id_);
- static const std::int32_t ID = 21815278;
+ static const std::int32_t ID = 973884508;
std::int32_t get_id() const final {
return ID;
}
@@ -3410,14 +4045,14 @@ class chatTypeBasicGroup final : public ChatType {
class chatTypeSupergroup final : public ChatType {
public:
- int32 supergroup_id_;
+ int53 supergroup_id_;
bool is_channel_;
chatTypeSupergroup();
- chatTypeSupergroup(int32 supergroup_id_, bool is_channel_);
+ chatTypeSupergroup(int53 supergroup_id_, bool is_channel_);
- static const std::int32_t ID = 955152366;
+ static const std::int32_t ID = -1472570774;
std::int32_t get_id() const final {
return ID;
}
@@ -3428,13 +4063,13 @@ class chatTypeSupergroup final : public ChatType {
class chatTypeSecret final : public ChatType {
public:
int32 secret_chat_id_;
- int32 user_id_;
+ int53 user_id_;
chatTypeSecret();
- chatTypeSecret(int32 secret_chat_id_, int32 user_id_);
+ chatTypeSecret(int32 secret_chat_id_, int53 user_id_);
- static const std::int32_t ID = 136722563;
+ static const std::int32_t ID = 862366513;
std::int32_t get_id() const final {
return ID;
}
@@ -3545,11 +4180,87 @@ class checkChatUsernameResultPublicGroupsUnavailable final : public CheckChatUse
void store(TlStorerToString &s, const char *field_name) const final;
};
+class CheckStickerSetNameResult: public Object {
+ public:
+};
+
+class checkStickerSetNameResultOk final : public CheckStickerSetNameResult {
+ public:
+
+ checkStickerSetNameResultOk();
+
+ static const std::int32_t ID = -1404308904;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class checkStickerSetNameResultNameInvalid final : public CheckStickerSetNameResult {
+ public:
+
+ checkStickerSetNameResultNameInvalid();
+
+ static const std::int32_t ID = 177992244;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class checkStickerSetNameResultNameOccupied final : public CheckStickerSetNameResult {
+ public:
+
+ checkStickerSetNameResultNameOccupied();
+
+ static const std::int32_t ID = 1012980872;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class closedVectorPath final : public Object {
+ public:
+ array> commands_;
+
+ closedVectorPath();
+
+ explicit closedVectorPath(array> &&commands_);
+
+ static const std::int32_t ID = 589951657;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class colorReplacement final : public Object {
+ public:
+ int32 old_color_;
+ int32 new_color_;
+
+ colorReplacement();
+
+ colorReplacement(int32 old_color_, int32 new_color_);
+
+ static const std::int32_t ID = -1463786596;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class connectedWebsite final : public Object {
public:
int64 id_;
string domain_name_;
- int32 bot_user_id_;
+ int53 bot_user_id_;
string browser_;
string platform_;
int32 log_in_date_;
@@ -3559,9 +4270,9 @@ class connectedWebsite final : public Object {
connectedWebsite();
- connectedWebsite(int64 id_, string const &domain_name_, int32 bot_user_id_, string const &browser_, string const &platform_, int32 log_in_date_, int32 last_active_date_, string const &ip_, string const &location_);
+ connectedWebsite(int64 id_, string const &domain_name_, int53 bot_user_id_, string const &browser_, string const &platform_, int32 log_in_date_, int32 last_active_date_, string const &ip_, string const &location_);
- static const std::int32_t ID = -1538986855;
+ static const std::int32_t ID = 844014445;
std::int32_t get_id() const final {
return ID;
}
@@ -3660,13 +4371,13 @@ class contact final : public Object {
string first_name_;
string last_name_;
string vcard_;
- int32 user_id_;
+ int53 user_id_;
contact();
- contact(string const &phone_number_, string const &first_name_, string const &last_name_, string const &vcard_, int32 user_id_);
+ contact(string const &phone_number_, string const &first_name_, string const &last_name_, string const &vcard_, int53 user_id_);
- static const std::int32_t ID = -1483002540;
+ static const std::int32_t ID = -1993844876;
std::int32_t get_id() const final {
return ID;
}
@@ -4491,14 +5202,14 @@ class game final : public Object {
class gameHighScore final : public Object {
public:
int32 position_;
- int32 user_id_;
+ int53 user_id_;
int32 score_;
gameHighScore();
- gameHighScore(int32 position_, int32 user_id_, int32 score_);
+ gameHighScore(int32 position_, int53 user_id_, int32 score_);
- static const std::int32_t ID = -30778358;
+ static const std::int32_t ID = 342871838;
std::int32_t get_id() const final {
return ID;
}
@@ -4522,6 +5233,184 @@ class gameHighScores final : public Object {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class groupCall final : public Object {
+ public:
+ int32 id_;
+ string title_;
+ int32 scheduled_start_date_;
+ bool enabled_start_notification_;
+ bool is_active_;
+ bool is_joined_;
+ bool need_rejoin_;
+ bool can_be_managed_;
+ int32 participant_count_;
+ bool loaded_all_participants_;
+ array> recent_speakers_;
+ bool is_my_video_enabled_;
+ bool is_my_video_paused_;
+ bool can_enable_video_;
+ bool mute_new_participants_;
+ bool can_toggle_mute_new_participants_;
+ int32 record_duration_;
+ bool is_video_recorded_;
+ int32 duration_;
+
+ groupCall();
+
+ groupCall(int32 id_, string const &title_, int32 scheduled_start_date_, bool enabled_start_notification_, bool is_active_, bool is_joined_, bool need_rejoin_, bool can_be_managed_, int32 participant_count_, bool loaded_all_participants_, array> &&recent_speakers_, bool is_my_video_enabled_, bool is_my_video_paused_, bool can_enable_video_, bool mute_new_participants_, bool can_toggle_mute_new_participants_, int32 record_duration_, bool is_video_recorded_, int32 duration_);
+
+ static const std::int32_t ID = 1548892209;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class groupCallId final : public Object {
+ public:
+ int32 id_;
+
+ groupCallId();
+
+ explicit groupCallId(int32 id_);
+
+ static const std::int32_t ID = 350534469;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class groupCallParticipant final : public Object {
+ public:
+ object_ptr participant_id_;
+ int32 audio_source_id_;
+ int32 screen_sharing_audio_source_id_;
+ object_ptr video_info_;
+ object_ptr screen_sharing_video_info_;
+ string bio_;
+ bool is_current_user_;
+ bool is_speaking_;
+ bool is_hand_raised_;
+ bool can_be_muted_for_all_users_;
+ bool can_be_unmuted_for_all_users_;
+ bool can_be_muted_for_current_user_;
+ bool can_be_unmuted_for_current_user_;
+ bool is_muted_for_all_users_;
+ bool is_muted_for_current_user_;
+ bool can_unmute_self_;
+ int32 volume_level_;
+ string order_;
+
+ groupCallParticipant();
+
+ groupCallParticipant(object_ptr &&participant_id_, int32 audio_source_id_, int32 screen_sharing_audio_source_id_, object_ptr &&video_info_, object_ptr &&screen_sharing_video_info_, string const &bio_, bool is_current_user_, bool is_speaking_, bool is_hand_raised_, bool can_be_muted_for_all_users_, bool can_be_unmuted_for_all_users_, bool can_be_muted_for_current_user_, bool can_be_unmuted_for_current_user_, bool is_muted_for_all_users_, bool is_muted_for_current_user_, bool can_unmute_self_, int32 volume_level_, string const &order_);
+
+ static const std::int32_t ID = 2059182571;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class groupCallParticipantVideoInfo final : public Object {
+ public:
+ array> source_groups_;
+ string endpoint_id_;
+ bool is_paused_;
+
+ groupCallParticipantVideoInfo();
+
+ groupCallParticipantVideoInfo(array> &&source_groups_, string const &endpoint_id_, bool is_paused_);
+
+ static const std::int32_t ID = -14294645;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class groupCallRecentSpeaker final : public Object {
+ public:
+ object_ptr participant_id_;
+ bool is_speaking_;
+
+ groupCallRecentSpeaker();
+
+ groupCallRecentSpeaker(object_ptr &&participant_id_, bool is_speaking_);
+
+ static const std::int32_t ID = 1819519436;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class GroupCallVideoQuality: public Object {
+ public:
+};
+
+class groupCallVideoQualityThumbnail final : public GroupCallVideoQuality {
+ public:
+
+ groupCallVideoQualityThumbnail();
+
+ static const std::int32_t ID = -379186304;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class groupCallVideoQualityMedium final : public GroupCallVideoQuality {
+ public:
+
+ groupCallVideoQualityMedium();
+
+ static const std::int32_t ID = 394968234;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class groupCallVideoQualityFull final : public GroupCallVideoQuality {
+ public:
+
+ groupCallVideoQualityFull();
+
+ static const std::int32_t ID = -2125916617;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class groupCallVideoSourceGroup final : public Object {
+ public:
+ string semantics_;
+ array source_ids_;
+
+ groupCallVideoSourceGroup();
+
+ groupCallVideoSourceGroup(string const &semantics_, array &&source_ids_);
+
+ static const std::int32_t ID = -1190900785;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class hashtags final : public Object {
public:
array hashtags_;
@@ -4577,14 +5466,14 @@ class identityDocument final : public Object {
class importedContacts final : public Object {
public:
- array user_ids_;
+ array user_ids_;
array importer_count_;
importedContacts();
- importedContacts(array &&user_ids_, array &&importer_count_);
+ importedContacts(array &&user_ids_, array &&importer_count_);
- static const std::int32_t ID = -741685354;
+ static const std::int32_t ID = 2068432290;
std::int32_t get_id() const final {
return ID;
}
@@ -4632,14 +5521,14 @@ class inlineKeyboardButtonTypeUrl final : public InlineKeyboardButtonType {
class inlineKeyboardButtonTypeLoginUrl final : public InlineKeyboardButtonType {
public:
string url_;
- int32 id_;
+ int53 id_;
string forward_text_;
inlineKeyboardButtonTypeLoginUrl();
- inlineKeyboardButtonTypeLoginUrl(string const &url_, int32 id_, string const &forward_text_);
+ inlineKeyboardButtonTypeLoginUrl(string const &url_, int53 id_, string const &forward_text_);
- static const std::int32_t ID = 281435539;
+ static const std::int32_t ID = -1203413081;
std::int32_t get_id() const final {
return ID;
}
@@ -5092,22 +5981,6 @@ class inputCredentialsNew final : public InputCredentials {
void store(TlStorerToString &s, const char *field_name) const final;
};
-class inputCredentialsAndroidPay final : public InputCredentials {
- public:
- string data_;
-
- inputCredentialsAndroidPay();
-
- explicit inputCredentialsAndroidPay(string const &data_);
-
- static const std::int32_t ID = 1979566832;
- std::int32_t get_id() const final {
- return ID;
- }
-
- void store(TlStorerToString &s, const char *field_name) const final;
-};
-
class inputCredentialsApplePay final : public InputCredentials {
public:
string data_;
@@ -5124,6 +5997,22 @@ class inputCredentialsApplePay final : public InputCredentials {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class inputCredentialsGooglePay final : public InputCredentials {
+ public:
+ string data_;
+
+ inputCredentialsGooglePay();
+
+ explicit inputCredentialsGooglePay(string const &data_);
+
+ static const std::int32_t ID = 844384100;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class InputFile: public Object {
public:
};
@@ -5608,12 +6497,13 @@ class inputMessageSticker final : public InputMessageContent {
object_ptr thumbnail_;
int32 width_;
int32 height_;
+ string emoji_;
inputMessageSticker();
- inputMessageSticker(object_ptr &&sticker_, object_ptr &&thumbnail_, int32 width_, int32 height_);
+ inputMessageSticker(object_ptr &&sticker_, object_ptr &&thumbnail_, int32 width_, int32 height_, string const &emoji_);
- static const std::int32_t ID = 740776325;
+ static const std::int32_t ID = 1072805625;
std::int32_t get_id() const final {
return ID;
}
@@ -5753,14 +6643,14 @@ class inputMessageDice final : public InputMessageContent {
class inputMessageGame final : public InputMessageContent {
public:
- int32 bot_user_id_;
+ int53 bot_user_id_;
string game_short_name_;
inputMessageGame();
- inputMessageGame(int32 bot_user_id_, string const &game_short_name_);
+ inputMessageGame(int53 bot_user_id_, string const &game_short_name_);
- static const std::int32_t ID = -1728000914;
+ static const std::int32_t ID = 1252944610;
std::int32_t get_id() const final {
return ID;
}
@@ -6288,10 +7178,392 @@ class inputThumbnail final : public Object {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class InternalLinkType: public Object {
+ public:
+};
+
+class internalLinkTypeActiveSessions final : public InternalLinkType {
+ public:
+
+ internalLinkTypeActiveSessions();
+
+ static const std::int32_t ID = 1886108589;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeAuthenticationCode final : public InternalLinkType {
+ public:
+ string code_;
+
+ internalLinkTypeAuthenticationCode();
+
+ explicit internalLinkTypeAuthenticationCode(string const &code_);
+
+ static const std::int32_t ID = -209235982;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeBackground final : public InternalLinkType {
+ public:
+ string background_name_;
+
+ internalLinkTypeBackground();
+
+ explicit internalLinkTypeBackground(string const &background_name_);
+
+ static const std::int32_t ID = 185411848;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeBotStart final : public InternalLinkType {
+ public:
+ string bot_username_;
+ string start_parameter_;
+
+ internalLinkTypeBotStart();
+
+ internalLinkTypeBotStart(string const &bot_username_, string const &start_parameter_);
+
+ static const std::int32_t ID = -1206724291;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeBotStartInGroup final : public InternalLinkType {
+ public:
+ string bot_username_;
+ string start_parameter_;
+
+ internalLinkTypeBotStartInGroup();
+
+ internalLinkTypeBotStartInGroup(string const &bot_username_, string const &start_parameter_);
+
+ static const std::int32_t ID = -1040096100;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeChangePhoneNumber final : public InternalLinkType {
+ public:
+
+ internalLinkTypeChangePhoneNumber();
+
+ static const std::int32_t ID = -265856255;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeChatInvite final : public InternalLinkType {
+ public:
+ string invite_link_;
+
+ internalLinkTypeChatInvite();
+
+ explicit internalLinkTypeChatInvite(string const &invite_link_);
+
+ static const std::int32_t ID = 428621017;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeFilterSettings final : public InternalLinkType {
+ public:
+
+ internalLinkTypeFilterSettings();
+
+ static const std::int32_t ID = 1501632411;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeGame final : public InternalLinkType {
+ public:
+ string bot_username_;
+ string game_short_name_;
+
+ internalLinkTypeGame();
+
+ internalLinkTypeGame(string const &bot_username_, string const &game_short_name_);
+
+ static const std::int32_t ID = -260788787;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeLanguagePack final : public InternalLinkType {
+ public:
+ string language_pack_id_;
+
+ internalLinkTypeLanguagePack();
+
+ explicit internalLinkTypeLanguagePack(string const &language_pack_id_);
+
+ static const std::int32_t ID = -1450766996;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeMessage final : public InternalLinkType {
+ public:
+ string url_;
+
+ internalLinkTypeMessage();
+
+ explicit internalLinkTypeMessage(string const &url_);
+
+ static const std::int32_t ID = 978541650;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeMessageDraft final : public InternalLinkType {
+ public:
+ object_ptr text_;
+ bool contains_link_;
+
+ internalLinkTypeMessageDraft();
+
+ internalLinkTypeMessageDraft(object_ptr &&text_, bool contains_link_);
+
+ static const std::int32_t ID = 661633749;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypePassportDataRequest final : public InternalLinkType {
+ public:
+ int53 bot_user_id_;
+ string scope_;
+ string public_key_;
+ string nonce_;
+ string callback_url_;
+
+ internalLinkTypePassportDataRequest();
+
+ internalLinkTypePassportDataRequest(int53 bot_user_id_, string const &scope_, string const &public_key_, string const &nonce_, string const &callback_url_);
+
+ static const std::int32_t ID = -988819839;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypePhoneNumberConfirmation final : public InternalLinkType {
+ public:
+ string hash_;
+ string phone_number_;
+
+ internalLinkTypePhoneNumberConfirmation();
+
+ internalLinkTypePhoneNumberConfirmation(string const &hash_, string const &phone_number_);
+
+ static const std::int32_t ID = 1757375254;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeProxy final : public InternalLinkType {
+ public:
+ string server_;
+ int32 port_;
+ object_ptr type_;
+
+ internalLinkTypeProxy();
+
+ internalLinkTypeProxy(string const &server_, int32 port_, object_ptr &&type_);
+
+ static const std::int32_t ID = -1313788694;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypePublicChat final : public InternalLinkType {
+ public:
+ string chat_username_;
+
+ internalLinkTypePublicChat();
+
+ explicit internalLinkTypePublicChat(string const &chat_username_);
+
+ static const std::int32_t ID = -1485547717;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeQrCodeAuthentication final : public InternalLinkType {
+ public:
+
+ internalLinkTypeQrCodeAuthentication();
+
+ static const std::int32_t ID = -1089332956;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeSettings final : public InternalLinkType {
+ public:
+
+ internalLinkTypeSettings();
+
+ static const std::int32_t ID = 393561524;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeStickerSet final : public InternalLinkType {
+ public:
+ string sticker_set_name_;
+
+ internalLinkTypeStickerSet();
+
+ explicit internalLinkTypeStickerSet(string const &sticker_set_name_);
+
+ static const std::int32_t ID = -529639751;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeTheme final : public InternalLinkType {
+ public:
+ string theme_name_;
+
+ internalLinkTypeTheme();
+
+ explicit internalLinkTypeTheme(string const &theme_name_);
+
+ static const std::int32_t ID = -200935417;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeThemeSettings final : public InternalLinkType {
+ public:
+
+ internalLinkTypeThemeSettings();
+
+ static const std::int32_t ID = -1051903722;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeUnknownDeepLink final : public InternalLinkType {
+ public:
+ string link_;
+
+ internalLinkTypeUnknownDeepLink();
+
+ explicit internalLinkTypeUnknownDeepLink(string const &link_);
+
+ static const std::int32_t ID = 625596379;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeUnsupportedProxy final : public InternalLinkType {
+ public:
+
+ internalLinkTypeUnsupportedProxy();
+
+ static const std::int32_t ID = -566649079;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class internalLinkTypeVideoChat final : public InternalLinkType {
+ public:
+ string chat_username_;
+ string invite_hash_;
+ bool is_live_stream_;
+
+ internalLinkTypeVideoChat();
+
+ internalLinkTypeVideoChat(string const &chat_username_, string const &invite_hash_, bool is_live_stream_);
+
+ static const std::int32_t ID = -2020149068;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class invoice final : public Object {
public:
string currency_;
array> price_parts_;
+ int53 max_tip_amount_;
+ array suggested_tip_amounts_;
bool is_test_;
bool need_name_;
bool need_phone_number_;
@@ -6303,9 +7575,9 @@ class invoice final : public Object {
invoice();
- invoice(string const ¤cy_, array> &&price_parts_, bool is_test_, bool need_name_, bool need_phone_number_, bool need_email_address_, bool need_shipping_address_, bool send_phone_number_to_provider_, bool send_email_address_to_provider_, bool is_flexible_);
+ invoice(string const ¤cy_, array> &&price_parts_, int53 max_tip_amount_, array &&suggested_tip_amounts_, bool is_test_, bool need_name_, bool need_phone_number_, bool need_email_address_, bool need_shipping_address_, bool send_phone_number_to_provider_, bool send_email_address_to_provider_, bool is_flexible_);
- static const std::int32_t ID = -368451690;
+ static const std::int32_t ID = 1479250728;
std::int32_t get_id() const final {
return ID;
}
@@ -6798,14 +8070,14 @@ class loginUrlInfoRequestConfirmation final : public LoginUrlInfo {
public:
string url_;
string domain_;
- int32 bot_user_id_;
+ int53 bot_user_id_;
bool request_write_access_;
loginUrlInfoRequestConfirmation();
- loginUrlInfoRequestConfirmation(string const &url_, string const &domain_, int32 bot_user_id_, bool request_write_access_);
+ loginUrlInfoRequestConfirmation(string const &url_, string const &domain_, int53 bot_user_id_, bool request_write_access_);
- static const std::int32_t ID = -1761898342;
+ static const std::int32_t ID = 2128290863;
std::int32_t get_id() const final {
return ID;
}
@@ -6903,6 +8175,9 @@ class message final : public Object {
bool can_be_deleted_for_all_users_;
bool can_get_statistics_;
bool can_get_message_thread_;
+ bool can_get_viewers_;
+ bool can_get_media_timestamp_links_;
+ bool has_timestamped_media_;
bool is_channel_post_;
bool contains_unread_mention_;
int32 date_;
@@ -6914,7 +8189,7 @@ class message final : public Object {
int53 message_thread_id_;
int32 ttl_;
double ttl_expires_in_;
- int32 via_bot_user_id_;
+ int53 via_bot_user_id_;
string author_signature_;
int64 media_album_id_;
string restriction_reason_;
@@ -6923,9 +8198,43 @@ class message final : public Object {
message();
- message(int53 id_, object_ptr &&sender_, int53 chat_id_, object_ptr &&sending_state_, object_ptr &&scheduling_state_, bool is_outgoing_, bool is_pinned_, bool can_be_edited_, bool can_be_forwarded_, bool can_be_deleted_only_for_self_, bool can_be_deleted_for_all_users_, bool can_get_statistics_, bool can_get_message_thread_, bool is_channel_post_, bool contains_unread_mention_, int32 date_, int32 edit_date_, object_ptr &&forward_info_, object_ptr &&interaction_info_, int53 reply_in_chat_id_, int53 reply_to_message_id_, int53 message_thread_id_, int32 ttl_, double ttl_expires_in_, int32 via_bot_user_id_, string const &author_signature_, int64 media_album_id_, string const &restriction_reason_, object_ptr &&content_, object_ptr &&reply_markup_);
+ message(int53 id_, object_ptr &&sender_, int53 chat_id_, object_ptr &&sending_state_, object_ptr &&scheduling_state_, bool is_outgoing_, bool is_pinned_, bool can_be_edited_, bool can_be_forwarded_, bool can_be_deleted_only_for_self_, bool can_be_deleted_for_all_users_, bool can_get_statistics_, bool can_get_message_thread_, bool can_get_viewers_, bool can_get_media_timestamp_links_, bool has_timestamped_media_, bool is_channel_post_, bool contains_unread_mention_, int32 date_, int32 edit_date_, object_ptr &&forward_info_, object_ptr &&interaction_info_, int53 reply_in_chat_id_, int53 reply_to_message_id_, int53 message_thread_id_, int32 ttl_, double ttl_expires_in_, int53 via_bot_user_id_, string const &author_signature_, int64 media_album_id_, string const &restriction_reason_, object_ptr &&content_, object_ptr &&reply_markup_);
- static const std::int32_t ID = -1370136327;
+ static const std::int32_t ID = -484595207;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class messageCalendar final : public Object {
+ public:
+ int32 total_count_;
+ array> days_;
+
+ messageCalendar();
+
+ messageCalendar(int32 total_count_, array> &&days_);
+
+ static const std::int32_t ID = -1682890519;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class messageCalendarDay final : public Object {
+ public:
+ int32 total_count_;
+ object_ptr message_;
+
+ messageCalendarDay();
+
+ messageCalendarDay(int32 total_count_, object_ptr &&message_);
+
+ static const std::int32_t ID = -376467614;
std::int32_t get_id() const final {
return ID;
}
@@ -7172,6 +8481,23 @@ class messageContact final : public MessageContent {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class messageAnimatedEmoji final : public MessageContent {
+ public:
+ object_ptr animated_emoji_;
+ string emoji_;
+
+ messageAnimatedEmoji();
+
+ messageAnimatedEmoji(object_ptr &&animated_emoji_, string const &emoji_);
+
+ static const std::int32_t ID = 908195298;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class messageDice final : public MessageContent {
public:
object_ptr initial_state_;
@@ -7266,16 +8592,82 @@ class messageCall final : public MessageContent {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class messageVideoChatScheduled final : public MessageContent {
+ public:
+ int32 group_call_id_;
+ int32 start_date_;
+
+ messageVideoChatScheduled();
+
+ messageVideoChatScheduled(int32 group_call_id_, int32 start_date_);
+
+ static const std::int32_t ID = -1855185481;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class messageVideoChatStarted final : public MessageContent {
+ public:
+ int32 group_call_id_;
+
+ messageVideoChatStarted();
+
+ explicit messageVideoChatStarted(int32 group_call_id_);
+
+ static const std::int32_t ID = 521225561;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class messageVideoChatEnded final : public MessageContent {
+ public:
+ int32 duration_;
+
+ messageVideoChatEnded();
+
+ explicit messageVideoChatEnded(int32 duration_);
+
+ static const std::int32_t ID = 2032544855;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class messageInviteVideoChatParticipants final : public MessageContent {
+ public:
+ int32 group_call_id_;
+ array user_ids_;
+
+ messageInviteVideoChatParticipants();
+
+ messageInviteVideoChatParticipants(int32 group_call_id_, array &&user_ids_);
+
+ static const std::int32_t ID = -1459065585;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class messageBasicGroupChatCreate final : public MessageContent {
public:
string title_;
- array member_user_ids_;
+ array member_user_ids_;
messageBasicGroupChatCreate();
- messageBasicGroupChatCreate(string const &title_, array &&member_user_ids_);
+ messageBasicGroupChatCreate(string const &title_, array &&member_user_ids_);
- static const std::int32_t ID = 1575377646;
+ static const std::int32_t ID = 795404060;
std::int32_t get_id() const final {
return ID;
}
@@ -7346,13 +8738,13 @@ class messageChatDeletePhoto final : public MessageContent {
class messageChatAddMembers final : public MessageContent {
public:
- array member_user_ids_;
+ array member_user_ids_;
messageChatAddMembers();
- explicit messageChatAddMembers(array &&member_user_ids_);
+ explicit messageChatAddMembers(array &&member_user_ids_);
- static const std::int32_t ID = 401228326;
+ static const std::int32_t ID = 1701117908;
std::int32_t get_id() const final {
return ID;
}
@@ -7373,15 +8765,28 @@ class messageChatJoinByLink final : public MessageContent {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class messageChatJoinByRequest final : public MessageContent {
+ public:
+
+ messageChatJoinByRequest();
+
+ static const std::int32_t ID = 1195428732;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class messageChatDeleteMember final : public MessageContent {
public:
- int32 user_id_;
+ int53 user_id_;
messageChatDeleteMember();
- explicit messageChatDeleteMember(int32 user_id_);
+ explicit messageChatDeleteMember(int53 user_id_);
- static const std::int32_t ID = 1164414043;
+ static const std::int32_t ID = 938029481;
std::int32_t get_id() const final {
return ID;
}
@@ -7391,13 +8796,13 @@ class messageChatDeleteMember final : public MessageContent {
class messageChatUpgradeTo final : public MessageContent {
public:
- int32 supergroup_id_;
+ int53 supergroup_id_;
messageChatUpgradeTo();
- explicit messageChatUpgradeTo(int32 supergroup_id_);
+ explicit messageChatUpgradeTo(int53 supergroup_id_);
- static const std::int32_t ID = 1957816681;
+ static const std::int32_t ID = 104813723;
std::int32_t get_id() const final {
return ID;
}
@@ -7408,13 +8813,13 @@ class messageChatUpgradeTo final : public MessageContent {
class messageChatUpgradeFrom final : public MessageContent {
public:
string title_;
- int32 basic_group_id_;
+ int53 basic_group_id_;
messageChatUpgradeFrom();
- messageChatUpgradeFrom(string const &title_, int32 basic_group_id_);
+ messageChatUpgradeFrom(string const &title_, int53 basic_group_id_);
- static const std::int32_t ID = 1642272558;
+ static const std::int32_t ID = 325954268;
std::int32_t get_id() const final {
return ID;
}
@@ -7451,6 +8856,22 @@ class messageScreenshotTaken final : public MessageContent {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class messageChatSetTheme final : public MessageContent {
+ public:
+ string theme_name_;
+
+ messageChatSetTheme();
+
+ explicit messageChatSetTheme(string const &theme_name_);
+
+ static const std::int32_t ID = -1716612088;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class messageChatSetTtl final : public MessageContent {
public:
int32 ttl_;
@@ -7503,15 +8924,16 @@ class messageGameScore final : public MessageContent {
class messagePaymentSuccessful final : public MessageContent {
public:
+ int53 invoice_chat_id_;
int53 invoice_message_id_;
string currency_;
int53 total_amount_;
messagePaymentSuccessful();
- messagePaymentSuccessful(int53 invoice_message_id_, string const ¤cy_, int53 total_amount_);
+ messagePaymentSuccessful(int53 invoice_chat_id_, int53 invoice_message_id_, string const ¤cy_, int53 total_amount_);
- static const std::int32_t ID = -595962993;
+ static const std::int32_t ID = 1442934098;
std::int32_t get_id() const final {
return ID;
}
@@ -7521,7 +8943,6 @@ class messagePaymentSuccessful final : public MessageContent {
class messagePaymentSuccessfulBot final : public MessageContent {
public:
- int53 invoice_message_id_;
string currency_;
int53 total_amount_;
bytes invoice_payload_;
@@ -7532,9 +8953,9 @@ class messagePaymentSuccessfulBot final : public MessageContent {
messagePaymentSuccessfulBot();
- messagePaymentSuccessfulBot(int53 invoice_message_id_, string const ¤cy_, int53 total_amount_, bytes const &invoice_payload_, string const &shipping_option_id_, object_ptr &&order_info_, string const &telegram_payment_charge_id_, string const &provider_payment_charge_id_);
+ messagePaymentSuccessfulBot(string const ¤cy_, int53 total_amount_, bytes const &invoice_payload_, string const &shipping_option_id_, object_ptr &&order_info_, string const &telegram_payment_charge_id_, string const &provider_payment_charge_id_);
- static const std::int32_t ID = -412310696;
+ static const std::int32_t ID = -438430050;
std::int32_t get_id() const final {
return ID;
}
@@ -7653,6 +9074,55 @@ class messageCopyOptions final : public Object {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class MessageFileType: public Object {
+ public:
+};
+
+class messageFileTypePrivate final : public MessageFileType {
+ public:
+ string name_;
+
+ messageFileTypePrivate();
+
+ explicit messageFileTypePrivate(string const &name_);
+
+ static const std::int32_t ID = -521908524;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class messageFileTypeGroup final : public MessageFileType {
+ public:
+ string title_;
+
+ messageFileTypeGroup();
+
+ explicit messageFileTypeGroup(string const &title_);
+
+ static const std::int32_t ID = -219836568;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class messageFileTypeUnknown final : public MessageFileType {
+ public:
+
+ messageFileTypeUnknown();
+
+ static const std::int32_t ID = 1176353458;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class messageForwardInfo final : public Object {
public:
object_ptr origin_;
@@ -7679,13 +9149,13 @@ class MessageForwardOrigin: public Object {
class messageForwardOriginUser final : public MessageForwardOrigin {
public:
- int32 sender_user_id_;
+ int53 sender_user_id_;
messageForwardOriginUser();
- explicit messageForwardOriginUser(int32 sender_user_id_);
+ explicit messageForwardOriginUser(int53 sender_user_id_);
- static const std::int32_t ID = 2781520;
+ static const std::int32_t ID = -355174191;
std::int32_t get_id() const final {
return ID;
}
@@ -7744,6 +9214,22 @@ class messageForwardOriginChannel final : public MessageForwardOrigin {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class messageForwardOriginMessageImport final : public MessageForwardOrigin {
+ public:
+ string sender_name_;
+
+ messageForwardOriginMessageImport();
+
+ explicit messageForwardOriginMessageImport(string const &sender_name_);
+
+ static const std::int32_t ID = -739561951;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class messageInteractionInfo final : public Object {
public:
int32 view_count_;
@@ -7784,14 +9270,50 @@ class messageLinkInfo final : public Object {
bool is_public_;
int53 chat_id_;
object_ptr message_;
+ int32 media_timestamp_;
bool for_album_;
bool for_comment_;
messageLinkInfo();
- messageLinkInfo(bool is_public_, int53 chat_id_, object_ptr &&message_, bool for_album_, bool for_comment_);
+ messageLinkInfo(bool is_public_, int53 chat_id_, object_ptr &&message_, int32 media_timestamp_, bool for_album_, bool for_comment_);
- static const std::int32_t ID = -1002342529;
+ static const std::int32_t ID = -981646294;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class messagePosition final : public Object {
+ public:
+ int32 position_;
+ int53 message_id_;
+ int32 date_;
+
+ messagePosition();
+
+ messagePosition(int32 position_, int53 message_id_, int32 date_);
+
+ static const std::int32_t ID = 1292189935;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class messagePositions final : public Object {
+ public:
+ int32 total_count_;
+ array> positions_;
+
+ messagePositions();
+
+ messagePositions(int32 total_count_, array> &&positions_);
+
+ static const std::int32_t ID = -1930466649;
std::int32_t get_id() const final {
return ID;
}
@@ -7876,13 +9398,13 @@ class MessageSender: public Object {
class messageSenderUser final : public MessageSender {
public:
- int32 user_id_;
+ int53 user_id_;
messageSenderUser();
- explicit messageSenderUser(int32 user_id_);
+ explicit messageSenderUser(int53 user_id_);
- static const std::int32_t ID = 1647122213;
+ static const std::int32_t ID = -336109341;
std::int32_t get_id() const final {
return ID;
}
@@ -7980,14 +9502,15 @@ class messageThreadInfo final : public Object {
int53 chat_id_;
int53 message_thread_id_;
object_ptr reply_info_;
+ int32 unread_message_count_;
array> messages_;
object_ptr draft_message_;
messageThreadInfo();
- messageThreadInfo(int53 chat_id_, int53 message_thread_id_, object_ptr &&reply_info_, array> &&messages_, object_ptr &&draft_message_);
+ messageThreadInfo(int53 chat_id_, int53 message_thread_id_, object_ptr &&reply_info_, int32 unread_message_count_, array> &&messages_, object_ptr &&draft_message_);
- static const std::int32_t ID = -65494328;
+ static const std::int32_t ID = -248536056;
std::int32_t get_id() const final {
return ID;
}
@@ -9754,12 +11277,13 @@ class passwordState final : public Object {
bool has_recovery_email_address_;
bool has_passport_data_;
object_ptr recovery_email_address_code_info_;
+ int32 pending_reset_date_;
passwordState();
- passwordState(bool has_password_, string const &password_hint_, bool has_recovery_email_address_, bool has_passport_data_, object_ptr &&recovery_email_address_code_info_);
+ passwordState(bool has_password_, string const &password_hint_, bool has_recovery_email_address_, bool has_passport_data_, object_ptr &&recovery_email_address_code_info_, int32 pending_reset_date_);
- static const std::int32_t ID = -1154797731;
+ static const std::int32_t ID = -2001619202;
std::int32_t get_id() const final {
return ID;
}
@@ -9769,8 +11293,11 @@ class passwordState final : public Object {
class paymentForm final : public Object {
public:
+ int64 id_;
object_ptr invoice_;
string url_;
+ int53 seller_bot_user_id_;
+ int53 payments_provider_user_id_;
object_ptr payments_provider_;
object_ptr saved_order_info_;
object_ptr saved_credentials_;
@@ -9779,9 +11306,30 @@ class paymentForm final : public Object {
paymentForm();
- paymentForm(object_ptr &&invoice_, string const &url_, object_ptr &&payments_provider_, object_ptr &&saved_order_info_, object_ptr &&saved_credentials_, bool can_save_credentials_, bool need_password_);
+ paymentForm(int64 id_, object_ptr &&invoice_, string const &url_, int53 seller_bot_user_id_, int53 payments_provider_user_id_, object_ptr &&payments_provider_, object_ptr &&saved_order_info_, object_ptr &&saved_credentials_, bool can_save_credentials_, bool need_password_);
- static const std::int32_t ID = -200418230;
+ static const std::int32_t ID = 1462608358;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
+class paymentFormTheme final : public Object {
+ public:
+ int32 background_color_;
+ int32 text_color_;
+ int32 hint_color_;
+ int32 link_color_;
+ int32 button_color_;
+ int32 button_text_color_;
+
+ paymentFormTheme();
+
+ paymentFormTheme(int32 background_color_, int32 text_color_, int32 hint_color_, int32 link_color_, int32 button_color_, int32 button_text_color_);
+
+ static const std::int32_t ID = -1760030833;
std::int32_t get_id() const final {
return ID;
}
@@ -9791,18 +11339,23 @@ class paymentForm final : public Object {
class paymentReceipt final : public Object {
public:
+ string title_;
+ string description_;
+ object_ptr photo_;
int32 date_;
- int32 payments_provider_user_id_;
+ int53 seller_bot_user_id_;
+ int53 payments_provider_user_id_;
object_ptr invoice_;
object_ptr order_info_;
object_ptr shipping_option_;
string credentials_title_;
+ int53 tip_amount_;
paymentReceipt();
- paymentReceipt(int32 date_, int32 payments_provider_user_id_, object_ptr &&invoice_, object_ptr &&order_info_, object_ptr &&shipping_option_, string const &credentials_title_);
+ paymentReceipt(string const &title_, string const &description_, object_ptr &&photo_, int32 date_, int53 seller_bot_user_id_, int53 payments_provider_user_id_, object_ptr &&invoice_, object_ptr &&order_info_, object_ptr &&shipping_option_, string const &credentials_title_, int53 tip_amount_);
- static const std::int32_t ID = -1171223545;
+ static const std::int32_t ID = -401796169;
std::int32_t get_id() const final {
return ID;
}
@@ -9962,13 +11515,30 @@ class photoSize final : public Object {
void store(TlStorerToString &s, const char *field_name) const final;
};
+class point final : public Object {
+ public:
+ double x_;
+ double y_;
+
+ point();
+
+ point(double x_, double y_);
+
+ static const std::int32_t ID = 437515705;
+ std::int32_t get_id() const final {
+ return ID;
+ }
+
+ void store(TlStorerToString &s, const char *field_name) const final;
+};
+
class poll final : public Object {
public:
int64 id_;
string question_;
array> options_;
int32 total_voter_count_;
- array recent_voter_user_ids_;
+ array recent_voter_user_ids_;
bool is_anonymous_;
object_ptr type_;
int32 open_period_;
@@ -9977,9 +11547,9 @@ class poll final : public Object {
poll();
- poll(int64 id_, string const &question_, array> &&options_, int32 total_voter_count_, array