"Set Bot Photo" button in managed bots.

This commit is contained in:
John Preston
2026-03-31 12:59:06 +07:00
parent f62ae325df
commit 95a53d51a3
10 changed files with 170 additions and 23 deletions
+6 -2
View File
@@ -565,9 +565,9 @@ not_null<UserData*> Session::processUser(const MTPUser &data) {
if (!hasStarsPerMessage) {
result->setStarsPerMessage(0);
}
result->setBotInfoVersion(data.vbot_info_version().value_or(-1));
if (!minimal) {
result->setBotInfoVersion(data.vbot_info_version().value_or(-1));
if (const auto info = result->botInfo.get()) {
info->readsAllHistory = data.is_bot_chat_history();
if (info->cantJoinGroups != data.is_bot_nochats()) {
@@ -581,7 +581,11 @@ not_null<UserData*> Session::processUser(const MTPUser &data) {
}
info->supportsAttachMenu = data.is_bot_attach_menu();
info->supportsBusiness = data.is_bot_business();
info->canEditInformation = data.is_bot_can_edit();
const auto canEditInformation = data.is_bot_can_edit();
if (info->canEditInformation != canEditInformation) {
info->canEditInformation = canEditInformation;
flags |= UpdateFlag::ManagedBot;
}
info->activeUsers = data.vbot_active_users().value_or_empty();
info->hasMainApp = data.is_bot_has_main_app();
info->userCreatesTopics = data.is_bot_forum_can_manage_topics();