mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 07:18:57 +01:00
Merge 0305abeee2
into 2fc1313aee
This commit is contained in:
commit
b9bf1eeab1
@ -11,7 +11,7 @@
|
|||||||
* @author Amir Hossein Jafari <amirhosseinjafari8228@gmail.com>
|
* @author Amir Hossein Jafari <amirhosseinjafari8228@gmail.com>
|
||||||
* @copyright 2016-2023 Amir Hossein Jafari <amirhosseinjafari8228@gmail.com>
|
* @copyright 2016-2023 Amir Hossein Jafari <amirhosseinjafari8228@gmail.com>
|
||||||
* @license https://opensource.org/licenses/AGPL-3.0 AGPLv3
|
* @license https://opensource.org/licenses/AGPL-3.0 AGPLv3
|
||||||
* @link https://docs.madelineproto.xyz MadelineProto documentation
|
* @link https://docs.madelineproto.xyz MadelineProto documentation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace danog\MadelineProto\EventHandler\Channel;
|
namespace danog\MadelineProto\EventHandler\Channel;
|
||||||
@ -19,12 +19,11 @@ 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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
{
|
{
|
||||||
@ -63,13 +62,13 @@ 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 Member(['user_id' => $this->userId, 'date' => $this->date]);
|
: new Left(['peer' => $this->userId]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user