From 0f05a1fd63801cac7e1aa52be3a85b40f1998682 Mon Sep 17 00:00:00 2001 From: c0re100 Date: Tue, 15 Mar 2022 00:02:57 +0800 Subject: [PATCH] Fix incorrect admin log Type: Restricted to Left --- .../SourceFiles/history/admin_log/history_admin_log_item.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp index 09c0e62ca9..c795493db3 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -483,7 +483,10 @@ auto GenerateParticipantChangeText( user, ChatRestrictionsInfo(), oldRestrictions); - } else if (oldParticipant && oldParticipant->type() == Type::Restricted && participant.type() == Type::Member) { + } else if (oldParticipant + && oldParticipant->type() == Type::Restricted + && (participant.type() == Type::Member + || participant.type() == Type::Left)) { return GeneratePermissionsChangeText( participantId, user,