2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-04 00:15:42 +00:00

Added API support of channel flag for channel statistics.

This commit is contained in:
23rd
2023-05-25 21:53:34 +03:00
committed by John Preston
parent c9eb9a3ee0
commit c71f35778d

View File

@@ -997,7 +997,8 @@ void ApplyChannelUpdate(
| Flag::PreHistoryHidden | Flag::PreHistoryHidden
| Flag::AntiSpam | Flag::AntiSpam
| Flag::Location | Flag::Location
| Flag::ParticipantsHidden; | Flag::ParticipantsHidden
| Flag::CanGetStatistics;
channel->setFlags((channel->flags() & ~mask) channel->setFlags((channel->flags() & ~mask)
| (update.is_can_set_username() ? Flag::CanSetUsername : Flag()) | (update.is_can_set_username() ? Flag::CanSetUsername : Flag())
| (update.is_can_view_participants() | (update.is_can_view_participants()
@@ -1009,7 +1010,8 @@ void ApplyChannelUpdate(
| (update.vlocation() ? Flag::Location : Flag()) | (update.vlocation() ? Flag::Location : Flag())
| (update.is_participants_hidden() | (update.is_participants_hidden()
? Flag::ParticipantsHidden ? Flag::ParticipantsHidden
: Flag())); : Flag())
| (update.is_can_view_stats() ? Flag::CanGetStatistics : Flag()));
channel->setUserpicPhoto(update.vchat_photo()); channel->setUserpicPhoto(update.vchat_photo());
if (const auto migratedFrom = update.vmigrated_from_chat_id()) { if (const auto migratedFrom = update.vmigrated_from_chat_id()) {
channel->addFlags(Flag::Megagroup); channel->addFlags(Flag::Megagroup);