From 94819c221877b4bd17a5e1459687858c1c60ef2e Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 23 Jan 2023 19:39:30 +0300 Subject: [PATCH] Fix handling of requestPeerTypeBroadcast. --- td/telegram/RequestedDialogType.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/td/telegram/RequestedDialogType.cpp b/td/telegram/RequestedDialogType.cpp index 34d11f61b..c4392e9bc 100644 --- a/td/telegram/RequestedDialogType.cpp +++ b/td/telegram/RequestedDialogType.cpp @@ -68,14 +68,14 @@ RequestedDialogType::RequestedDialogType(telegram_api::object_ptr(peer_type); - type_ = Type::Group; - restrict_has_username_ = (type->flags_ & telegram_api::requestPeerTypeChat::HAS_USERNAME_MASK) != 0; + type_ = Type::Channel; + restrict_has_username_ = (type->flags_ & telegram_api::requestPeerTypeBroadcast::HAS_USERNAME_MASK) != 0; has_username_ = type->has_username_; is_created_ = type->creator_; restrict_user_administrator_rights_ = type->user_admin_rights_ != nullptr; restrict_bot_administrator_rights_ = type->bot_admin_rights_ != nullptr; - user_administrator_rights_ = AdministratorRights(type->user_admin_rights_, ChannelType::Megagroup); - bot_administrator_rights_ = AdministratorRights(type->bot_admin_rights_, ChannelType::Megagroup); + user_administrator_rights_ = AdministratorRights(type->user_admin_rights_, ChannelType::Broadcast); + bot_administrator_rights_ = AdministratorRights(type->bot_admin_rights_, ChannelType::Broadcast); break; } default: