mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 22:34:42 +01:00
Compare commits
5 Commits
af346fb046
...
77211064e9
Author | SHA1 | Date | |
---|---|---|---|
77211064e9 | |||
bcc493b7a5 | |||
96501b64f6 | |||
|
0305abeee2 | ||
|
016528faa9 |
@ -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\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\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\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\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\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.
|
* [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
2
docs
@ -1 +1 @@
|
|||||||
Subproject commit f42967628f037daf1d60faae8049c58da1bd90a3
|
Subproject commit 9545494397382ac8ebc073fc9e74fc97451f5fb0
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<files psalm-version="dev-master@16b24bdc94e052b5ce69fd232a77416a1f6ec3e6">
|
<files psalm-version="dev-master@dee5fe4e848ebe974581cf92bb59abe868b3367a">
|
||||||
<file src="src/API.php">
|
<file src="src/API.php">
|
||||||
<ArgumentTypeCoercion>
|
<ArgumentTypeCoercion>
|
||||||
<code><![CDATA[$settings]]></code>
|
<code><![CDATA[$settings]]></code>
|
||||||
|
@ -51,7 +51,7 @@ final class API extends AbstractAPI
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE = '8.3.3';
|
public const RELEASE = '8.3.4';
|
||||||
/**
|
/**
|
||||||
* We're not logged in.
|
* We're not logged in.
|
||||||
*
|
*
|
||||||
|
@ -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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ final class PeerDatabase implements TLCallback
|
|||||||
if (!$this->API->settings->getDb()->getEnableUsernameDb()) {
|
if (!$this->API->settings->getDb()->getEnableUsernameDb()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$new = self::getUsernames($new);
|
$new = $new ? self::getUsernames($new) : [];
|
||||||
$old = $old ? self::getUsernames($old) : [];
|
$old = $old ? self::getUsernames($old) : [];
|
||||||
$diffToRemove = array_diff($old, $new);
|
$diffToRemove = array_diff($old, $new);
|
||||||
$diffToAdd = array_diff($new, $old);
|
$diffToAdd = array_diff($new, $old);
|
||||||
|
Loading…
Reference in New Issue
Block a user