Skip to content

Commit

Permalink
f Migrated flags for full user info from MTP to TDLib.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Oct 23, 2024
1 parent 095a2f8 commit d699b7c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Telegram/SourceFiles/data/data_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,17 +837,13 @@ void ApplyUserUpdate(
const auto mask = Flag::Blocked
// | Flag::HasPhoneCalls // Unused.
| Flag::PhoneCallsPrivate
| Flag::CanReceiveGifts
| Flag::CanPinMessages
| Flag::VoiceMessagesForbidden;
const auto blocked = update.vblock_list()
&& (update.vblock_list()->type() == id_blockListMain);
user->setFlags((user->flags() & ~mask)
| (update.vhas_private_calls().v ? Flag::PhoneCallsPrivate : Flag())
// | (update.is_phone_calls_available() ? Flag::HasPhoneCalls : Flag())
| (!update.vpremium_gift_options().v.empty()
? Flag::CanReceiveGifts
: Flag())
| (true /* Always true from TDLib. */ ? Flag::CanPinMessages : Flag())
| (blocked ? Flag::Blocked : Flag())
| (update.vhas_restricted_voice_and_video_note_messages().v
Expand Down

0 comments on commit d699b7c

Please sign in to comment.