fix(core): correctly handle banning of non-members in ChatMemberUpdate

This commit is contained in:
alina 🌸 2024-12-15 15:32:49 +03:00
parent cc4cf35611
commit 1c5815ecf0
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -108,7 +108,8 @@ export class ChatMemberUpdate {
const actorId = this.raw.actorId
if (!old && cur) {
// join or added
// joined, added or kicked
if (cur._ === 'channelParticipantBanned') return 'kicked'
return actorId === curId ? 'joined' : 'added'
}