1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-23 01:11:25 +01:00
This commit is contained in:
AhJ 2024-01-06 19:34:14 +03:30
parent d033365030
commit 2f0bec11da
2 changed files with 10 additions and 10 deletions

View File

@ -19,17 +19,17 @@ namespace danog\MadelineProto\EventHandler\Filter;
use danog\MadelineProto\EventHandler;
use danog\MadelineProto\EventHandler\Typing;
use danog\MadelineProto\EventHandler\Update;
use danog\MadelineProto\EventHandler\User\Phone;
use danog\MadelineProto\EventHandler\BotCommands;
use danog\MadelineProto\EventHandler\InlineQuery;
use danog\MadelineProto\EventHandler\BotCommands;
use danog\MadelineProto\EventHandler\AbstractStory;
use danog\MadelineProto\EventHandler\AbstractMessage;
use danog\MadelineProto\EventHandler\User\Phone;
use danog\MadelineProto\EventHandler\User\Status;
use danog\MadelineProto\EventHandler\User\Blocked;
use danog\MadelineProto\EventHandler\AbstractStory;
use danog\MadelineProto\EventHandler\User\Username;
use danog\MadelineProto\EventHandler\User\BotStopped;
use danog\MadelineProto\EventHandler\Query\ButtonQuery;
use danog\MadelineProto\EventHandler\Story\StoryReaction;
use danog\MadelineProto\EventHandler\Message\GroupMessage;
use danog\MadelineProto\EventHandler\Channel\ChannelParticipant;
use danog\MadelineProto\EventHandler\ChatInviteRequester\BotChatInviteRequest;
@ -52,7 +52,7 @@ abstract class AbstractFilterFromSender extends Filter
}
public function apply(Update $update): bool
{
return ($update instanceof GroupMessage && $update->senderId === $this->peerResolved) ||
return ($update instanceof AbstractMessage && $update->senderId === $this->peerResolved) ||
($update instanceof AbstractStory && $update->senderId === $this->peerResolved) ||
($update instanceof StoryReaction && $update->senderId === $this->peerResolved) ||
($update instanceof ButtonQuery && $update->userId === $this->peerResolved) ||

View File

@ -19,17 +19,17 @@ namespace danog\MadelineProto\EventHandler\Filter;
use danog\MadelineProto\EventHandler;
use danog\MadelineProto\EventHandler\Typing;
use danog\MadelineProto\EventHandler\Update;
use danog\MadelineProto\EventHandler\User\Phone;
use danog\MadelineProto\EventHandler\BotCommands;
use danog\MadelineProto\EventHandler\InlineQuery;
use danog\MadelineProto\EventHandler\BotCommands;
use danog\MadelineProto\EventHandler\AbstractStory;
use danog\MadelineProto\EventHandler\AbstractMessage;
use danog\MadelineProto\EventHandler\User\Phone;
use danog\MadelineProto\EventHandler\User\Status;
use danog\MadelineProto\EventHandler\User\Blocked;
use danog\MadelineProto\EventHandler\AbstractStory;
use danog\MadelineProto\EventHandler\User\Username;
use danog\MadelineProto\EventHandler\User\BotStopped;
use danog\MadelineProto\EventHandler\Query\ButtonQuery;
use danog\MadelineProto\EventHandler\Story\StoryReaction;
use danog\MadelineProto\EventHandler\Message\GroupMessage;
use danog\MadelineProto\EventHandler\Channel\ChannelParticipant;
use danog\MadelineProto\EventHandler\ChatInviteRequester\BotChatInviteRequest;
@ -63,7 +63,7 @@ abstract class AbstractFilterFromSenders extends Filter
}
public function apply(Update $update): bool
{
return $update instanceof GroupMessage && \in_array($update->senderId, $this->peersResolved, true) ||
return $update instanceof AbstractMessage && \in_array($update->senderId, $this->peersResolved, true) ||
($update instanceof AbstractStory && \in_array($update->senderId, $this->peersResolved, true)) ||
($update instanceof StoryReaction && \in_array($update->senderId, $this->peersResolved, true)) ||
($update instanceof ButtonQuery && \in_array($update->userId, $this->peersResolved, true)) ||