mirror of
https://github.com/tdlib/telegram-bot-api
synced 2025-08-22 18:08:31 +00:00
Update TDLib to 1.8.50.
This commit is contained in:
parent
aea82942c3
commit
3bb8011223
2
td
2
td
@ -1 +1 @@
|
||||
Subproject commit e6d0516e0def13ed6a75ec10b9ac8d4383379245
|
||||
Subproject commit fb98271dc674904190a47358cab32fce00948245
|
@ -3691,6 +3691,8 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const {
|
||||
}
|
||||
case td_api::messageGroupCall::ID:
|
||||
break;
|
||||
case td_api::messageDirectMessagePriceChanged::ID:
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
@ -3703,7 +3705,7 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const {
|
||||
if (!message_->can_be_saved) {
|
||||
object("has_protected_content", td::JsonTrue());
|
||||
}
|
||||
if (message_->is_topic_message) {
|
||||
if (is_topic_message(message_->topic_id)) {
|
||||
object("is_topic_message", td::JsonTrue());
|
||||
}
|
||||
if (message_->is_from_offline) {
|
||||
@ -5731,7 +5733,7 @@ class Client::TdOnCheckMessageThreadCallback final : public TdQueryCallback {
|
||||
if (message_info->message_thread_id != message_thread_id_) {
|
||||
return fail_query_with_error(std::move(query_), 400, "MESSAGE_THREAD_INVALID", "Message thread not found");
|
||||
}
|
||||
if (!message_info->is_topic_message) {
|
||||
if (!is_topic_message(message_info->topic_id)) {
|
||||
return fail_query_with_error(std::move(query_), 400, "MESSAGE_THREAD_INVALID",
|
||||
"Message thread is not a forum topic thread");
|
||||
}
|
||||
@ -8986,8 +8988,8 @@ td_api::object_ptr<td_api::messageSendOptions> Client::get_message_send_options(
|
||||
bool protect_content,
|
||||
bool allow_paid_broadcast,
|
||||
int64 effect_id) {
|
||||
return make_object<td_api::messageSendOptions>(disable_notification, false, protect_content, allow_paid_broadcast, 0,
|
||||
false, nullptr, effect_id, 0, false);
|
||||
return make_object<td_api::messageSendOptions>(0, disable_notification, false, protect_content, allow_paid_broadcast,
|
||||
0, false, nullptr, effect_id, 0, false);
|
||||
}
|
||||
|
||||
td::Result<td_api::object_ptr<td_api::inlineQueryResultsButton>> Client::get_inline_query_results_button(
|
||||
@ -15470,6 +15472,8 @@ bool Client::need_skip_update_message(int64 chat_id, const object_ptr<td_api::me
|
||||
return true;
|
||||
case td_api::messageGroupCall::ID:
|
||||
return true;
|
||||
case td_api::messageDirectMessagePriceChanged::ID:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -15983,7 +15987,7 @@ void Client::init_message(MessageInfo *message_info, object_ptr<td_api::message>
|
||||
message_info->can_be_saved = message->can_be_saved_;
|
||||
message_info->is_scheduled = message->scheduling_state_ != nullptr;
|
||||
message_info->is_from_offline = message->is_from_offline_;
|
||||
message_info->is_topic_message = message->is_topic_message_;
|
||||
message_info->topic_id = std::move(message->topic_id_);
|
||||
message_info->author_signature = std::move(message->author_signature_);
|
||||
message_info->sender_boost_count = message->sender_boost_count_;
|
||||
message_info->paid_message_star_count = message->paid_message_star_count_;
|
||||
@ -16228,6 +16232,11 @@ td::int64 Client::get_status_custom_emoji_id(const object_ptr<td_api::emojiStatu
|
||||
}
|
||||
}
|
||||
|
||||
bool Client::is_topic_message(const object_ptr<td_api::MessageTopic> &topic_id) {
|
||||
return topic_id != nullptr && topic_id->get_id() == td_api::messageTopicForum::ID &&
|
||||
static_cast<const td_api::messageTopicForum *>(topic_id.get())->forum_topic_id_ != GENERAL_MESSAGE_THREAD_ID;
|
||||
}
|
||||
|
||||
td::FlatHashMap<td::string, td::Status (Client::*)(PromisedQueryPtr &query)> Client::methods_;
|
||||
|
||||
} // namespace telegram_bot_api
|
||||
|
@ -1035,6 +1035,7 @@ class Client final : public WebhookActor::Callback {
|
||||
td::unique_ptr<MessageInfo> business_reply_to_message;
|
||||
object_ptr<td_api::messageReplyToMessage> reply_to_message;
|
||||
object_ptr<td_api::messageReplyToStory> reply_to_story;
|
||||
object_ptr<td_api::MessageTopic> topic_id;
|
||||
int64 media_album_id = 0;
|
||||
int64 via_bot_user_id = 0;
|
||||
object_ptr<td_api::MessageContent> content;
|
||||
@ -1045,7 +1046,6 @@ class Client final : public WebhookActor::Callback {
|
||||
|
||||
bool can_be_saved = false;
|
||||
bool is_automatic_forward = false;
|
||||
bool is_topic_message = false;
|
||||
bool is_from_offline = false;
|
||||
bool is_scheduled = false;
|
||||
mutable bool is_content_changed = false;
|
||||
@ -1170,6 +1170,8 @@ class Client final : public WebhookActor::Callback {
|
||||
|
||||
static int64 get_status_custom_emoji_id(const object_ptr<td_api::emojiStatus> &emoji_status);
|
||||
|
||||
static bool is_topic_message(const object_ptr<td_api::MessageTopic> &topic);
|
||||
|
||||
void add_update_poll(object_ptr<td_api::updatePoll> &&update);
|
||||
|
||||
void add_update_poll_answer(object_ptr<td_api::updatePollAnswer> &&update);
|
||||
|
Loading…
x
Reference in New Issue
Block a user