mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 04:11:11 +01:00
fixing
This commit is contained in:
parent
d033365030
commit
2f0bec11da
@ -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) ||
|
||||
|
@ -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)) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user