aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2026-05-01 18:00:31 +0300
committerlevlam <levlam@telegram.org>2026-05-01 18:00:31 +0300
commitfb0d5002dbbe87f85d0b2031b69906a09593c7b8 (patch)
tree33d55259a5a84214c8c3e24d6869c20eb34d80b6
parent55bacb718fc08746ffd2fb0b369e8bc29d02a0e6 (diff)
Add Message.guest_bot_caller_user/guest_bot_caller_chat.
-rw-r--r--telegram-bot-api/Client.cpp5
-rw-r--r--telegram-bot-api/Client.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp
index 830010f..bfa1928 100644
--- a/telegram-bot-api/Client.cpp
+++ b/telegram-bot-api/Client.cpp
@@ -4606,6 +4606,10 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const {
if (message_->via_bot_user_id > 0) {
object("via_bot", JsonUser(message_->via_bot_user_id, client_));
}
+ if (message_->guest_bot_caller_id != nullptr) {
+ client_->json_store_message_sender(object, message_->guest_bot_caller_id, "guest_bot_caller_user",
+ "guest_bot_caller_chat");
+ }
if (!message_->can_be_saved) {
object("has_protected_content", td::JsonTrue());
}
@@ -17768,6 +17772,7 @@ td::unique_ptr<Client::MessageInfo> Client::create_message(object_ptr<td_api::me
message_info->edit_date = message->edit_date_;
message_info->media_album_id = message->media_album_id_;
message_info->via_bot_user_id = message->via_bot_user_id_;
+ message_info->guest_bot_caller_id = std::move(message->guest_bot_caller_id_);
message_info->sender_business_bot_user_id = message->sender_business_bot_user_id_;
if (message->forward_info_ != nullptr) {
diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h
index 4edfe38..c5c81ec 100644
--- a/telegram-bot-api/Client.h
+++ b/telegram-bot-api/Client.h
@@ -1149,6 +1149,7 @@ class Client final : public WebhookActor::Callback {
object_ptr<td_api::MessageTopic> topic_id;
int64 media_album_id = 0;
int64 via_bot_user_id = 0;
+ object_ptr<td_api::MessageSender> guest_bot_caller_id;
object_ptr<td_api::MessageContent> content;
object_ptr<td_api::suggestedPostInfo> suggested_post_info;
object_ptr<td_api::ReplyMarkup> reply_markup;