Update TDLib to 1.8.22.

This commit is contained in:
levlam 2023-12-04 13:42:00 +03:00 committed by David Guillen Fandos
parent de0d0ad75d
commit aa0f369132
3 changed files with 16 additions and 9 deletions

2
td

@ -1 +1 @@
Subproject commit 9184b3e62de59663a59d3500528aee7e5f0d83fa
Subproject commit 4dbcfce77d6f2ef95b3f1d2ef8ef6b0c66a4fd4d

View File

@ -2390,9 +2390,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) {
@ -2723,6 +2723,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:
@ -2735,8 +2738,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();
@ -6769,7 +6771,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);
}
@ -13136,6 +13138,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;
}
@ -13186,6 +13190,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);

View File

@ -288,13 +288,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;