From b0fec0b09de963626e62ea804ed414667780e35e Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 31 Oct 2022 17:09:34 +0300 Subject: [PATCH] Add Message.message_thread_id. --- telegram-bot-api/Client.cpp | 4 ++++ telegram-bot-api/Client.h | 1 + 2 files changed, 5 insertions(+) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index ed60f05..f6d8ebb 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -1746,6 +1746,9 @@ void Client::JsonMessage::store(JsonValueScope *scope) const { if (message_->edit_date > 0) { object("edit_date", message_->edit_date); } + if (message_->message_thread_id != 0) { + object("message_thread_id", as_client_message_id(message_->message_thread_id)); + } if (message_->initial_send_date > 0) { if (message_->initial_sender_user_id != 0) { object("forward_from", JsonUser(message_->initial_sender_user_id, client_)); @@ -10343,6 +10346,7 @@ Client::FullMessageId Client::add_message(object_ptr &&message, message_info->id = message_id; message_info->chat_id = chat_id; + message_info->message_thread_id = message->message_thread_id_; message_info->date = message->date_; message_info->edit_date = message->edit_date_; message_info->media_album_id = message->media_album_id_; diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index 281d118..5e79e27 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -730,6 +730,7 @@ class Client final : public WebhookActor::Callback { int64 sender_user_id = 0; int64 sender_chat_id = 0; int64 chat_id = 0; + int64 message_thread_id = 0; int32 date = 0; int32 edit_date = 0; int64 initial_chat_id = 0;