aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2023-12-04 13:42:00 +0300
committerlevlam <levlam@telegram.org>2023-12-04 13:42:00 +0300
commit59436578ee900968026f189f50e35ad181c7ec5b (patch)
treec3020491ee0d1a14ad3930b62fbd717e82f75a58
parente66ffb15565a701afc610a5320bd384dc0bf81f4 (diff)
Update TDLib to 1.8.22.
m---------td0
-rw-r--r--telegram-bot-api/Client.cpp19
-rw-r--r--telegram-bot-api/Client.h4
3 files changed, 15 insertions, 8 deletions
diff --git a/td b/td
-Subproject 9184b3e62de59663a59d3500528aee7e5f0d83f
+Subproject 4dbcfce77d6f2ef95b3f1d2ef8ef6b0c66a4fd4
diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp
index 2967f3f..282653c 100644
--- a/telegram-bot-api/Client.cpp
+++ b/telegram-bot-api/Client.cpp
@@ -2272,9 +2272,9 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const {
object("external_reply", JsonExternalReplyInfo(message_->reply_to_message.get(), client_));
}
if (message_->reply_to_message != nullptr && message_->reply_to_message->quote_ != nullptr) {
- object("quote", message_->reply_to_message->quote_->text_);
- if (!message_->reply_to_message->quote_->entities_.empty()) {
- object("quote_entities", JsonVectorEntities(message_->reply_to_message->quote_->entities_, client_));
+ object("quote", message_->reply_to_message->quote_->text_->text_);
+ if (!message_->reply_to_message->quote_->text_->entities_.empty()) {
+ object("quote_entities", JsonVectorEntities(message_->reply_to_message->quote_->text_->entities_, client_));
}
}
if (message_->media_album_id != 0) {
@@ -2605,6 +2605,9 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const {
object("chat_shared", JsonChatShared(content));
break;
}
+ case td_api::messageStory::ID:
+ object("story", JsonEmptyObject());
+ break;
case td_api::messageChatSetBackground::ID:
break;
case td_api::messagePremiumGiftCode::ID:
@@ -2617,8 +2620,7 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const {
object("giveaway", JsonGiveaway(content, client_));
break;
}
- case td_api::messageStory::ID:
- object("story", JsonEmptyObject());
+ case td_api::messagePremiumGiveawayCompleted::ID:
break;
default:
UNREACHABLE();
@@ -6062,7 +6064,7 @@ td::Result<Client::InputReplyParameters> Client::get_reply_parameters(td::JsonVa
result.reply_in_chat_id = std::move(chat_id);
result.reply_to_message_id = as_tdlib_message_id(td::max(message_id, 0));
result.allow_sending_without_reply = allow_sending_without_reply;
- result.quote = std::move(quote);
+ result.quote = td_api::make_object<td_api::inputTextQuote>(std::move(quote), 0);
return std::move(result);
}
@@ -11737,6 +11739,8 @@ bool Client::need_skip_update_message(int64 chat_id, const object_ptr<td_api::me
return true;
case td_api::messagePremiumGiftCode::ID:
return true;
+ case td_api::messagePremiumGiveawayCompleted::ID:
+ return true;
default:
break;
}
@@ -11787,6 +11791,9 @@ td::int64 Client::get_same_chat_reply_to_message_id(const object_ptr<td_api::mes
case td_api::messageChatSetBackground::ID:
return static_cast<const td_api::messageChatSetBackground *>(message->content_.get())
->old_background_message_id_;
+ case td_api::messagePremiumGiveawayCompleted::ID:
+ return static_cast<const td_api::messagePremiumGiveawayCompleted *>(message->content_.get())
+ ->giveaway_message_id_;
case td_api::messagePaymentSuccessful::ID:
UNREACHABLE();
return static_cast<int64>(0);
diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h
index fc1bc26..07ad798 100644
--- a/telegram-bot-api/Client.h
+++ b/telegram-bot-api/Client.h
@@ -249,13 +249,13 @@ class Client final : public WebhookActor::Callback {
td::string reply_in_chat_id;
int64 reply_to_message_id = 0;
bool allow_sending_without_reply = false;
- object_ptr<td_api::formattedText> quote;
+ object_ptr<td_api::inputTextQuote> quote;
};
struct CheckedReplyParameters {
int64 reply_in_chat_id = 0;
int64 reply_to_message_id = 0;
- object_ptr<td_api::formattedText> quote;
+ object_ptr<td_api::inputTextQuote> quote;
};
struct UserInfo;