Fix incorrect admin log

Type: Restricted to Left
This commit is contained in:
c0re100 2022-03-15 00:02:57 +08:00 committed by John Preston
parent c6d7270bbc
commit 0f05a1fd63
1 changed files with 4 additions and 1 deletions

View File

@ -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,