Commit 0192bb50 authored by Armando Lüscher's avatar Armando Lüscher Committed by GitHub

Merge pull request #581 from jacklul/fix-1

Fix for 0.47.0
parents 75d992c3 a738e09c
......@@ -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