From 99a1f0b9457db8e841aaf969f13c5872d74b3e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=8EAhJ?= Date: Tue, 29 Aug 2023 23:36:06 +0330 Subject: [PATCH 1/2] Fix bug --- src/EventHandler/Filter/AbstractFilterFromSenders.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EventHandler/Filter/AbstractFilterFromSenders.php b/src/EventHandler/Filter/AbstractFilterFromSenders.php index d3aba0345..85fb59e4b 100644 --- a/src/EventHandler/Filter/AbstractFilterFromSenders.php +++ b/src/EventHandler/Filter/AbstractFilterFromSenders.php @@ -54,7 +54,7 @@ abstract class AbstractFilterFromSenders extends Filter public function apply(Update $update): bool { return $update instanceof GroupMessage && \in_array($update->senderId, $this->peersResolved, true); - ($update instanceof ButtonQuery && \in_array($update->userId, $this->peerResolved, true)) || - ($update instanceof InlineQuery && \in_array($update->userId, $this->peerResolved, true)); + ($update instanceof ButtonQuery && \in_array($update->userId, $this->peersResolved, true)) || + ($update instanceof InlineQuery && \in_array($update->userId, $this->peersResolved, true)); } } From 656dcf7a6b93f3cfdb525778f28e93691df883e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=8EAhJ?= Date: Tue, 29 Aug 2023 23:54:55 +0330 Subject: [PATCH 2/2] Fixing --- src/EventHandler/Filter/AbstractFilterFromSenders.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventHandler/Filter/AbstractFilterFromSenders.php b/src/EventHandler/Filter/AbstractFilterFromSenders.php index a52b0a2ff..bdfcbb537 100644 --- a/src/EventHandler/Filter/AbstractFilterFromSenders.php +++ b/src/EventHandler/Filter/AbstractFilterFromSenders.php @@ -52,7 +52,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 GroupMessage && \in_array($update->senderId, $this->peersResolved, true) || ($update instanceof ButtonQuery && \in_array($update->userId, $this->peersResolved, true)) || ($update instanceof InlineQuery && \in_array($update->userId, $this->peersResolved, true)); }