From 27bbe0c71b6a34efeedb254e8e50fd78621ea118 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 11 Mar 2025 08:37:15 +0300 Subject: [PATCH] Fix Client::have_message_access. --- telegram-bot-api/Client.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 1445db2..2d9ae95 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -6932,6 +6932,9 @@ bool Client::is_chat_member(const object_ptr &status) } bool Client::have_message_access(int64 chat_id) const { + if (chat_id > 0) { + return true; // for unknown private chats during paid broadcasts + } auto chat_info = get_chat(chat_id); CHECK(chat_info != nullptr); switch (chat_info->type) {