1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 20:54:42 +01:00

Improve comments wording

This commit is contained in:
Piagrammist 2024-09-27 20:16:31 +03:30
parent 016528faa9
commit 0305abeee2

View File

@ -23,7 +23,7 @@ use danog\MadelineProto\EventHandler\Update;
use danog\MadelineProto\MTProto; use danog\MadelineProto\MTProto;
/** /**
* A participant has left, joined, was banned or admined in a [channel or supergroup](https://core.telegram.org/api/channel). * A participant has left, joined, was banned or admin'd in a [channel or supergroup](https://core.telegram.org/api/channel).
*/ */
final class ChannelParticipant extends Update final class ChannelParticipant extends Update
{ {
@ -62,11 +62,11 @@ final class ChannelParticipant extends Update
$this->inviteLink = isset($rawChannelParticipant['invite']) $this->inviteLink = isset($rawChannelParticipant['invite'])
? ChatInvite::fromRawChatInvite($rawChannelParticipant['invite']) ? ChatInvite::fromRawChatInvite($rawChannelParticipant['invite'])
: null; : null;
// If null, user lefted channel // If null, user wasn't a participant.
$this->prevParticipant = isset($rawChannelParticipant['prev_participant']) $this->prevParticipant = isset($rawChannelParticipant['prev_participant'])
? Participant::fromRawParticipant($rawChannelParticipant['prev_participant']) ? Participant::fromRawParticipant($rawChannelParticipant['prev_participant'])
: new Left(['peer' => $this->userId]); : new Left(['peer' => $this->userId]);
// if null, user joind // If null, user has left.
$this->newParticipant = isset($rawChannelParticipant['new_participant']) $this->newParticipant = isset($rawChannelParticipant['new_participant'])
? Participant::fromRawParticipant($rawChannelParticipant['new_participant']) ? Participant::fromRawParticipant($rawChannelParticipant['new_participant'])
: new Left(['peer' => $this->userId]); : new Left(['peer' => $this->userId]);