diff --git a/src/EventHandler/Filter/AbstractFilterFromSender.php b/src/EventHandler/Filter/AbstractFilterFromSender.php index 738b90b8b..5036f0bab 100644 --- a/src/EventHandler/Filter/AbstractFilterFromSender.php +++ b/src/EventHandler/Filter/AbstractFilterFromSender.php @@ -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) || diff --git a/src/EventHandler/Filter/AbstractFilterFromSenders.php b/src/EventHandler/Filter/AbstractFilterFromSenders.php index f1a2f2579..bb6f9e3d3 100644 --- a/src/EventHandler/Filter/AbstractFilterFromSenders.php +++ b/src/EventHandler/Filter/AbstractFilterFromSenders.php @@ -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)) ||