mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 07:18:57 +01:00
Fix: ChannelParticipant::newParticipant
default value must be set to Left
This commit is contained in:
parent
63ec44e3a2
commit
016528faa9
@ -19,7 +19,6 @@ namespace danog\MadelineProto\EventHandler\Channel;
|
|||||||
use danog\MadelineProto\EventHandler\ChatInvite;
|
use danog\MadelineProto\EventHandler\ChatInvite;
|
||||||
use danog\MadelineProto\EventHandler\Participant;
|
use danog\MadelineProto\EventHandler\Participant;
|
||||||
use danog\MadelineProto\EventHandler\Participant\Left;
|
use danog\MadelineProto\EventHandler\Participant\Left;
|
||||||
use danog\MadelineProto\EventHandler\Participant\Member;
|
|
||||||
use danog\MadelineProto\EventHandler\Update;
|
use danog\MadelineProto\EventHandler\Update;
|
||||||
use danog\MadelineProto\MTProto;
|
use danog\MadelineProto\MTProto;
|
||||||
|
|
||||||
@ -70,6 +69,6 @@ final class ChannelParticipant extends Update
|
|||||||
// if null, user joind
|
// if null, user joind
|
||||||
$this->newParticipant = isset($rawChannelParticipant['new_participant'])
|
$this->newParticipant = isset($rawChannelParticipant['new_participant'])
|
||||||
? Participant::fromRawParticipant($rawChannelParticipant['new_participant'])
|
? Participant::fromRawParticipant($rawChannelParticipant['new_participant'])
|
||||||
: new Member(['user_id' => $this->userId, 'date' => $this->date]);
|
: new Left(['peer' => $this->userId]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user