Skip to content

Commit 58db111

Browse files
committed
Add td_api::chatEventMemberTagChanged.
1 parent 5b9987b commit 58db111

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

‎td/generate/scheme/td_api.tl‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7033,6 +7033,9 @@ chatEventMemberPromoted user_id:int53 old_status:ChatMemberStatus new_status:Cha
70337033
//@description A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed @member_id Affected chat member identifier @old_status Previous status of the chat member @new_status New status of the chat member
70347034
chatEventMemberRestricted member_id:MessageSender old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction;
70357035

7036+
//@description A chat member tag has been changed @user_id Affected chat member user identifier @old_tag Previous tag of the chat member @new_tag New tag of the chat member
7037+
chatEventMemberTagChanged user_id:int53 old_tag:string new_tag:string = ChatEventAction;
7038+
70367039
//@description A chat member extended their subscription to the chat @user_id Affected chat member user identifier @old_status Previous status of the chat member @new_status New status of the chat member
70377040
chatEventMemberSubscriptionExtended user_id:int53 old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction;
70387041

‎td/telegram/DialogEventLog.cpp‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,16 @@ static td_api::object_ptr<td_api::ChatEventAction> get_chat_event_action_object(
522522
return td_api::make_object<td_api::chatEventAutomaticTranslationToggled>(action->new_value_);
523523
}
524524
case telegram_api::channelAdminLogEventActionParticipantEditRank::ID: {
525-
return nullptr;
525+
auto action =
526+
telegram_api::move_object_as<telegram_api::channelAdminLogEventActionParticipantEditRank>(action_ptr);
527+
UserId user_id(action->user_id_);
528+
if (!user_id.is_valid() || action->prev_rank_ == action->new_rank_) {
529+
LOG(ERROR) << "Receive " << to_string(action);
530+
return nullptr;
531+
}
532+
return td_api::make_object<td_api::chatEventMemberTagChanged>(
533+
td->user_manager_->get_user_id_object(user_id, "chatEventMemberTagChanged"), action->prev_rank_,
534+
action->new_rank_);
526535
}
527536
default:
528537
UNREACHABLE();

0 commit comments

Comments
 (0)