Remove *_FULL flags.
This commit is contained in:
parent
7d0c93fcd9
commit
9255d32af1
@ -10768,10 +10768,10 @@ void ContactsManager::on_get_chat_full(tl_object_ptr<telegram_api::ChatFull> &&c
|
||||
|
||||
ChannelFull *channel_full = add_channel_full(channel_id);
|
||||
|
||||
bool have_participant_count = (channel->flags_ & CHANNEL_FULL_FLAG_HAS_PARTICIPANT_COUNT) != 0;
|
||||
bool have_participant_count = (channel->flags_ & telegram_api::channelFull::PARTICIPANTS_COUNT_MASK) != 0;
|
||||
auto participant_count = have_participant_count ? channel->participants_count_ : channel_full->participant_count;
|
||||
auto administrator_count = 0;
|
||||
if ((channel->flags_ & CHANNEL_FULL_FLAG_HAS_ADMINISTRATOR_COUNT) != 0) {
|
||||
if ((channel->flags_ & telegram_api::channelFull::ADMINS_COUNT_MASK) != 0) {
|
||||
administrator_count = channel->admins_count_;
|
||||
} else if (c->is_megagroup || c->status.is_administrator()) {
|
||||
// in megagroups and administered channels don't drop known number of administrators
|
||||
@ -10804,7 +10804,7 @@ void ContactsManager::on_get_chat_full(tl_object_ptr<telegram_api::ChatFull> &&c
|
||||
td_->stickers_manager_->on_get_sticker_set(std::move(channel->emojiset_), true, "on_get_channel_full");
|
||||
}
|
||||
DcId stats_dc_id;
|
||||
if ((channel->flags_ & CHANNEL_FULL_FLAG_HAS_STATISTICS_DC_ID) != 0) {
|
||||
if ((channel->flags_ & telegram_api::channelFull::STATS_DC_MASK) != 0) {
|
||||
stats_dc_id = DcId::create(channel->stats_dc_);
|
||||
}
|
||||
if (!stats_dc_id.is_exact() && can_view_statistics) {
|
||||
@ -10876,7 +10876,7 @@ void ContactsManager::on_get_chat_full(tl_object_ptr<telegram_api::ChatFull> &&c
|
||||
|
||||
td_->messages_manager_->on_read_channel_outbox(channel_id,
|
||||
MessageId(ServerMessageId(channel->read_outbox_max_id_)));
|
||||
if ((channel->flags_ & CHANNEL_FULL_FLAG_HAS_AVAILABLE_MIN_MESSAGE_ID) != 0) {
|
||||
if ((channel->flags_ & telegram_api::channelFull::AVAILABLE_MIN_ID_MASK) != 0) {
|
||||
td_->messages_manager_->on_update_channel_max_unavailable_message_id(
|
||||
channel_id, MessageId(ServerMessageId(channel->available_min_id_)), "ChannelFull");
|
||||
}
|
||||
@ -10944,7 +10944,7 @@ void ContactsManager::on_get_chat_full(tl_object_ptr<telegram_api::ChatFull> &&c
|
||||
}
|
||||
|
||||
ChannelId linked_channel_id;
|
||||
if ((channel->flags_ & CHANNEL_FULL_FLAG_HAS_LINKED_CHANNEL_ID) != 0) {
|
||||
if ((channel->flags_ & telegram_api::channelFull::LINKED_CHAT_ID_MASK) != 0) {
|
||||
linked_channel_id = ChannelId(channel->linked_chat_id_);
|
||||
auto linked_channel = get_channel_force(linked_channel_id, "ChannelFull");
|
||||
if (linked_channel == nullptr || c->is_megagroup == linked_channel->is_megagroup ||
|
||||
|
@ -1166,22 +1166,6 @@ class ContactsManager final : public Actor {
|
||||
static constexpr int32 USER_FLAG_CAN_BE_EDITED_BOT = 1 << 1;
|
||||
static constexpr int32 USER_FLAG_IS_CLOSE_FRIEND = 1 << 2;
|
||||
|
||||
static constexpr int32 USER_FULL_FLAG_IS_BLOCKED = 1 << 0;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_ABOUT = 1 << 1;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_PHOTO = 1 << 2;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_BOT_INFO = 1 << 3;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_PINNED_MESSAGE = 1 << 6;
|
||||
static constexpr int32 USER_FULL_FLAG_CAN_PIN_MESSAGE = 1 << 7;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_FOLDER_ID = 1 << 11;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_SCHEDULED_MESSAGES = 1 << 12;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_MESSAGE_TTL = 1 << 14;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_PRIVATE_FORWARD_NAME = 1 << 16;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_GROUP_ADMINISTRATOR_RIGHTS = 1 << 17;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_BROADCAST_ADMINISTRATOR_RIGHTS = 1 << 18;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_VOICE_MESSAGES_FORBIDDEN = 1 << 20;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_PERSONAL_PHOTO = 1 << 21;
|
||||
static constexpr int32 USER_FULL_FLAG_HAS_FALLBACK_PHOTO = 1 << 22;
|
||||
|
||||
static constexpr int32 CHAT_FLAG_USER_IS_CREATOR = 1 << 0;
|
||||
static constexpr int32 CHAT_FLAG_USER_HAS_LEFT = 1 << 2;
|
||||
// static constexpr int32 CHAT_FLAG_ADMINISTRATORS_ENABLED = 1 << 3;
|
||||
@ -1192,14 +1176,6 @@ class ContactsManager final : public Actor {
|
||||
static constexpr int32 CHAT_FLAG_IS_GROUP_CALL_NON_EMPTY = 1 << 24;
|
||||
static constexpr int32 CHAT_FLAG_NOFORWARDS = 1 << 25;
|
||||
|
||||
static constexpr int32 CHAT_FULL_FLAG_HAS_PINNED_MESSAGE = 1 << 6;
|
||||
static constexpr int32 CHAT_FULL_FLAG_HAS_SCHEDULED_MESSAGES = 1 << 8;
|
||||
static constexpr int32 CHAT_FULL_FLAG_HAS_FOLDER_ID = 1 << 11;
|
||||
static constexpr int32 CHAT_FULL_FLAG_HAS_ACTIVE_GROUP_CALL = 1 << 12;
|
||||
static constexpr int32 CHAT_FULL_FLAG_HAS_MESSAGE_TTL = 1 << 14;
|
||||
static constexpr int32 CHAT_FULL_FLAG_HAS_PENDING_REQUEST_COUNT = 1 << 17;
|
||||
static constexpr int32 CHAT_FULL_FLAG_HAS_AVAILABLE_REACTIONS = 1 << 18;
|
||||
|
||||
static constexpr int32 CHANNEL_FLAG_USER_IS_CREATOR = 1 << 0;
|
||||
static constexpr int32 CHANNEL_FLAG_USER_HAS_LEFT = 1 << 2;
|
||||
static constexpr int32 CHANNEL_FLAG_IS_BROADCAST = 1 << 5;
|
||||
@ -1229,37 +1205,6 @@ class ContactsManager final : public Actor {
|
||||
static constexpr int32 CHANNEL_FLAG_IS_FORUM = 1 << 30;
|
||||
static constexpr int32 CHANNEL_FLAG_HAS_USERNAMES = 1 << 0;
|
||||
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_PARTICIPANT_COUNT = 1 << 0;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_ADMINISTRATOR_COUNT = 1 << 1;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_BANNED_COUNT = 1 << 2;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_CAN_GET_PARTICIPANTS = 1 << 3;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_MIGRATED_FROM = 1 << 4;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_PINNED_MESSAGE = 1 << 5;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_CAN_SET_USERNAME = 1 << 6;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_CAN_SET_STICKER_SET = 1 << 7;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_STICKER_SET = 1 << 8;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_AVAILABLE_MIN_MESSAGE_ID = 1 << 9;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_IS_ALL_HISTORY_HIDDEN = 1 << 10;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_FOLDER_ID = 1 << 11;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_STATISTICS_DC_ID = 1 << 12;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_ONLINE_MEMBER_COUNT = 1 << 13;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_LINKED_CHANNEL_ID = 1 << 14;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_LOCATION = 1 << 15;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_CAN_SET_LOCATION = 1 << 16;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_SLOW_MODE_DELAY = 1 << 17;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_SLOW_MODE_NEXT_SEND_DATE = 1 << 18;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_SCHEDULED_MESSAGES = 1 << 19;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_CAN_VIEW_STATISTICS = 1 << 20;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_ACTIVE_GROUP_CALL = 1 << 21;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_IS_BLOCKED = 1 << 22;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_EXPORTED_INVITE = 1 << 23;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_MESSAGE_TTL = 1 << 24;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_PENDING_REQUEST_COUNT = 1 << 28;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_DEFAULT_SEND_AS = 1 << 29;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG_HAS_AVAILABLE_REACTIONS = 1 << 30;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG2_HAS_ANTISPAM = 1 << 1;
|
||||
static constexpr int32 CHANNEL_FULL_FLAG2_ARE_PARTICIPANTS_HIDDEN = 1 << 2;
|
||||
|
||||
static constexpr int32 USER_FULL_EXPIRE_TIME = 60;
|
||||
static constexpr int32 CHANNEL_FULL_EXPIRE_TIME = 60;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user