diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 5fa6a639..9060e777 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -451,12 +451,13 @@ basicGroupFullInfo description:string creator_user_id:int32 members:vectorhas_linked_channel != has_linked_channel || c->has_location != has_location || - c->sign_messages != sign_messages || c->is_megagroup != is_megagroup || c->is_verified != is_verified || - c->restriction_reason != restriction_reason || c->is_scam != is_scam) { + c->sign_messages != sign_messages || c->is_slow_mode_enabled != is_slow_mode_enabled || + c->is_megagroup != is_megagroup || c->is_verified != is_verified || c->restriction_reason != restriction_reason || + c->is_scam != is_scam) { c->has_linked_channel = has_linked_channel; c->has_location = has_location; c->sign_messages = sign_messages; + c->is_slow_mode_enabled = is_slow_mode_enabled; c->is_megagroup = is_megagroup; c->is_verified = is_verified; c->restriction_reason = std::move(restriction_reason); @@ -12097,6 +12105,7 @@ void ContactsManager::on_chat_update(telegram_api::channelForbidden &channel, co bool has_linked_channel = false; bool has_location = false; bool sign_messages = false; + bool is_slow_mode_enabled = false; bool is_megagroup = (channel.flags_ & CHANNEL_FLAG_IS_MEGAGROUP) != 0; bool is_verified = false; string restriction_reason; @@ -12119,11 +12128,13 @@ void ContactsManager::on_chat_update(telegram_api::channelForbidden &channel, co } if (c->has_linked_channel != has_linked_channel || c->has_location != has_location || - c->sign_messages != sign_messages || c->is_megagroup != is_megagroup || c->is_verified != is_verified || - c->restriction_reason != restriction_reason || c->is_scam != is_scam) { + c->sign_messages != sign_messages || c->is_slow_mode_enabled != is_slow_mode_enabled || + c->is_megagroup != is_megagroup || c->is_verified != is_verified || c->restriction_reason != restriction_reason || + c->is_scam != is_scam) { c->has_linked_channel = has_linked_channel; c->has_location = has_location; c->sign_messages = sign_messages; + c->is_slow_mode_enabled = is_slow_mode_enabled; c->is_megagroup = is_megagroup; c->is_verified = is_verified; c->restriction_reason = std::move(restriction_reason); @@ -12324,7 +12335,7 @@ int32 ContactsManager::get_supergroup_id_object(ChannelId channel_id, const char send_closure(G()->td(), &Td::send_update, td_api::make_object(td_api::make_object( channel_id.get(), string(), 0, DialogParticipantStatus::Banned(0).get_chat_member_status_object(), - 0, false, false, false, true, false, "", false))); + 0, false, false, false, false, true, false, "", false))); } return channel_id.get(); } @@ -12337,10 +12348,10 @@ tl_object_ptr ContactsManager::get_supergroup_object(Channel if (c == nullptr) { return nullptr; } - return make_tl_object(channel_id.get(), c->username, c->date, - get_channel_status(c).get_chat_member_status_object(), c->participant_count, - c->has_linked_channel, c->has_location, c->sign_messages, !c->is_megagroup, - c->is_verified, c->restriction_reason, c->is_scam); + return td_api::make_object( + channel_id.get(), c->username, c->date, get_channel_status(c).get_chat_member_status_object(), + c->participant_count, c->has_linked_channel, c->has_location, c->sign_messages, c->is_slow_mode_enabled, + !c->is_megagroup, c->is_verified, c->restriction_reason, c->is_scam); } tl_object_ptr ContactsManager::get_supergroup_full_info_object(ChannelId channel_id) const { @@ -12350,7 +12361,7 @@ tl_object_ptr ContactsManager::get_supergroup_full_i tl_object_ptr ContactsManager::get_supergroup_full_info_object( const ChannelFull *channel_full) const { CHECK(channel_full != nullptr); - return make_tl_object( + return td_api::make_object( channel_full->description, channel_full->participant_count, channel_full->administrator_count, channel_full->restricted_count, channel_full->banned_count, DialogId(channel_full->linked_channel_id).get(), channel_full->can_get_participants, channel_full->can_set_username, channel_full->can_set_sticker_set, diff --git a/td/telegram/ContactsManager.h b/td/telegram/ContactsManager.h index e2f4ce4f..2ea2df82 100644 --- a/td/telegram/ContactsManager.h +++ b/td/telegram/ContactsManager.h @@ -694,12 +694,13 @@ class ContactsManager : public Actor { int32 date = 0; int32 participant_count = 0; - static constexpr uint32 CACHE_VERSION = 3; + static constexpr uint32 CACHE_VERSION = 4; uint32 cache_version = 0; bool has_linked_channel = false; bool has_location = false; bool sign_messages = false; + bool is_slow_mode_enabled = false; bool is_megagroup = false; bool is_verified = false; @@ -903,6 +904,7 @@ class ContactsManager : public Actor { static constexpr int32 CHANNEL_FLAG_IS_SCAM = 1 << 19; static constexpr int32 CHANNEL_FLAG_HAS_LINKED_CHAT = 1 << 20; static constexpr int32 CHANNEL_FLAG_HAS_LOCATION = 1 << 21; + static constexpr int32 CHANNEL_FLAG_IS_SLOW_MODE_ENABLED = 1 << 22; static constexpr int32 CHANNEL_FULL_FLAG_HAS_PARTICIPANT_COUNT = 1 << 0; static constexpr int32 CHANNEL_FULL_FLAG_HAS_ADMINISTRATOR_COUNT = 1 << 1;