From fb0d5002dbbe87f85d0b2031b69906a09593c7b8 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 1 May 2026 18:00:31 +0300 Subject: [PATCH] Add Message.guest_bot_caller_user/guest_bot_caller_chat. --- telegram-bot-api/Client.cpp | 5 +++++ telegram-bot-api/Client.h | 1 + 2 files changed, 6 insertions(+) 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::create_message(object_ptredit_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 topic_id; int64 media_album_id = 0; int64 via_bot_user_id = 0; + object_ptr guest_bot_caller_id; object_ptr content; object_ptr suggested_post_info; object_ptr reply_markup;