2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added support of permission to manage channel earn.

This commit is contained in:
23rd
2024-03-27 21:31:20 +03:00
committed by John Preston
parent a1264a6088
commit c66b5b2490
2 changed files with 38 additions and 35 deletions

View File

@@ -1070,7 +1070,8 @@ void ApplyChannelUpdate(
| Flag::Location
| Flag::ParticipantsHidden
| Flag::CanGetStatistics
| Flag::ViewAsMessages;
| Flag::ViewAsMessages
| Flag::CanViewRevenue;
channel->setFlags((channel->flags() & ~mask)
| (update.is_can_set_username() ? Flag::CanSetUsername : Flag())
| (update.is_can_view_participants()
@@ -1086,7 +1087,8 @@ void ApplyChannelUpdate(
| (update.is_can_view_stats() ? Flag::CanGetStatistics : Flag())
| (update.is_view_forum_as_messages()
? Flag::ViewAsMessages
: Flag()));
: Flag())
| (update.is_can_view_revenue() ? Flag::CanViewRevenue : Flag()));
channel->setUserpicPhoto(update.vchat_photo());
if (const auto migratedFrom = update.vmigrated_from_chat_id()) {
channel->addFlags(Flag::Megagroup);