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

Merge branch 'v8' into v8-tas

This commit is contained in:
Daniil Gentili 2024-10-19 15:11:27 +00:00
commit 4b87e28c19
5 changed files with 9 additions and 10 deletions

View File

@ -131,7 +131,7 @@ Some of MadelineProto's core components are also available as separate, standalo
* [danog\MadelineProto\EventHandler\AbstractStory »](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/EventHandler/AbstractStory.html) - Represents a Telegram Story.
* [danog\MadelineProto\EventHandler\BotCommands »](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/EventHandler/BotCommands.html) - The [command set](https://core.telegram.org/api/bots/commands) of a certain bot in a certain chat has changed.
* [danog\MadelineProto\EventHandler\CallbackQuery »](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/EventHandler/CallbackQuery.html) - Represents a query sent by the user by clicking on a button.
* [danog\MadelineProto\EventHandler\Channel\ChannelParticipant »](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/EventHandler/Channel/ChannelParticipant.html) - A participant has left, joined, was banned or admined in a [channel or supergroup](https://core.telegram.org/api/channel).
* [danog\MadelineProto\EventHandler\Channel\ChannelParticipant »](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/EventHandler/Channel/ChannelParticipant.html) - A participant has left, joined, was banned or admin'd in a [channel or supergroup](https://core.telegram.org/api/channel).
* [danog\MadelineProto\EventHandler\Channel\MessageForwards »](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/EventHandler/Channel/MessageForwards.html) - Indicates that the forward counter of a message in a channel has changed.
* [danog\MadelineProto\EventHandler\Channel\MessageViewsChanged »](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/EventHandler/Channel/MessageViewsChanged.html) - Indicates that the view counter of a message in a channel has changed.
* [danog\MadelineProto\EventHandler\Channel\UpdateChannel »](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/EventHandler/Channel/UpdateChannel.html) - A new channel is available, or info about an existing channel was changed.

2
docs

@ -1 +1 @@
Subproject commit a08656066e6ecbe4dc2b3cae13ea457253574974
Subproject commit 9545494397382ac8ebc073fc9e74fc97451f5fb0

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="dev-master@16b24bdc94e052b5ce69fd232a77416a1f6ec3e6">
<files psalm-version="dev-master@dee5fe4e848ebe974581cf92bb59abe868b3367a">
<file src="src/API.php">
<ArgumentTypeCoercion>
<code><![CDATA[$settings]]></code>

View File

@ -51,7 +51,7 @@ final class API extends AbstractAPI
*
* @var string
*/
public const RELEASE = '8.3.3';
public const RELEASE = '8.3.4';
/**
* We're not logged in.
*

View File

@ -11,7 +11,7 @@
* @author Amir Hossein Jafari <amirhosseinjafari8228@gmail.com>
* @copyright 2016-2023 Amir Hossein Jafari <amirhosseinjafari8228@gmail.com>
* @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;
@ -19,12 +19,11 @@ namespace danog\MadelineProto\EventHandler\Channel;
use danog\MadelineProto\EventHandler\ChatInvite;
use danog\MadelineProto\EventHandler\Participant;
use danog\MadelineProto\EventHandler\Participant\Left;
use danog\MadelineProto\EventHandler\Participant\Member;
use danog\MadelineProto\EventHandler\Update;
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
{
@ -63,13 +62,13 @@ final class ChannelParticipant extends Update
$this->inviteLink = isset($rawChannelParticipant['invite'])
? ChatInvite::fromRawChatInvite($rawChannelParticipant['invite'])
: null;
// If null, user lefted channel
// If null, user wasn't a participant.
$this->prevParticipant = isset($rawChannelParticipant['prev_participant'])
? Participant::fromRawParticipant($rawChannelParticipant['prev_participant'])
: new Left(['peer' => $this->userId]);
// if null, user joind
// If null, user has left.
$this->newParticipant = isset($rawChannelParticipant['new_participant'])
? Participant::fromRawParticipant($rawChannelParticipant['new_participant'])
: new Member(['user_id' => $this->userId, 'date' => $this->date]);
: new Left(['peer' => $this->userId]);
}
}