Add channelParticipantLeft support,

GitOrigin-RevId: 59d3ba88fb54c848d99425ec3ad95760d1765e3a
This commit is contained in:
levlam 2020-10-14 22:35:30 +03:00
parent b1ed582737
commit 33b7ba57a9
3 changed files with 6 additions and 0 deletions

View File

@ -594,6 +594,7 @@ channelParticipantSelf#a3289a6d user_id:int inviter_id:int date:int = ChannelPar
channelParticipantCreator#447dca4b flags:# user_id:int admin_rights:ChatAdminRights rank:flags.0?string = ChannelParticipant;
channelParticipantAdmin#ccbebbaf flags:# can_edit:flags.0?true self:flags.1?true user_id:int inviter_id:flags.1?int promoted_by:int date:int admin_rights:ChatAdminRights rank:flags.2?string = ChannelParticipant;
channelParticipantBanned#1c0facaf flags:# left:flags.0?true user_id:int kicked_by:int date:int banned_rights:ChatBannedRights = ChannelParticipant;
channelParticipantLeft#c3c6796b user_id:int = ChannelParticipant;
channelParticipantsRecent#de3f3c79 = ChannelParticipantsFilter;
channelParticipantsAdmins#b4608969 = ChannelParticipantsFilter;

Binary file not shown.

View File

@ -661,6 +661,11 @@ DialogParticipant::DialogParticipant(tl_object_ptr<telegram_api::ChannelParticip
std::move(participant->rank_))};
break;
}
case telegram_api::channelParticipantLeft::ID: {
auto participant = move_tl_object_as<telegram_api::channelParticipantLeft>(participant_ptr);
*this = {UserId(participant->user_id_), UserId(), 0, DialogParticipantStatus::Left()};
break;
}
case telegram_api::channelParticipantBanned::ID: {
auto participant = move_tl_object_as<telegram_api::channelParticipantBanned>(participant_ptr);
auto is_member = (participant->flags_ & telegram_api::channelParticipantBanned::LEFT_MASK) == 0;