Commit a738e09c authored by Jack'lul's avatar Jack'lul

Make sure we only filter update types that directly call a command

parent 75d992c3
......@@ -368,17 +368,20 @@ abstract class Command
*/
protected function removeNonPrivateMessage()
{
$message = $this->getMessage();
$chat = $message->getChat();
$message = $this->getMessage() ?: $this->getEditedMessage();
if ($message) {
$chat = $message->getChat();
if (!$chat->isPrivateChat()) {
// Delete the falsely called command message.
Request::deleteMessage([
'chat_id' => $chat->getId(),
'message_id' => $message->getMessageId(),
]);
if (!$chat->isPrivateChat()) {
// Delete the falsely called command message.
Request::deleteMessage([
'chat_id' => $chat->getId(),
'message_id' => $message->getMessageId(),
]);
return true;
return true;
}
}
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment