From cec2f2f8752e18a9c94f309fa8a3803bc72c577d Mon Sep 17 00:00:00 2001 From: eleksir Date: Thu, 3 Feb 2022 02:03:50 +0300 Subject: [PATCH] Use ->canTalk() instead of ::canTalk() in Message.pm as it is more reliable way to check this --- lib/Teapot/Bot/Object/Message.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Teapot/Bot/Object/Message.pm b/lib/Teapot/Bot/Object/Message.pm index b5bf6ae..a828b13 100644 --- a/lib/Teapot/Bot/Object/Message.pm +++ b/lib/Teapot/Bot/Object/Message.pm @@ -157,7 +157,7 @@ sub reply { my $chatid = $self->chat->id; - if (Teapot::Bot::Object::ChatPermissions::canTalk($self, $chatid)) { + if (Teapot::Bot::Object::ChatPermissions->canTalk($self, $chatid)) { return $self->_brain->sendMessage({chat_id => $chatid, text => $text}); } @@ -170,7 +170,7 @@ sub replyMd { my $chatid = $self->chat->id; - if (Teapot::Bot::Object::ChatPermissions::canTalk ($self, $chatid)) { + if (Teapot::Bot::Object::ChatPermissions->canTalk ($self, $chatid)) { my $send_args; $send_args->{text} = $text; $send_args->{parse_mode} = 'Markdown'; @@ -187,7 +187,7 @@ sub typing { my $chatid = $self->chat->id; - if (Teapot::Bot::Object::ChatPermissions::canTalk ($self, $chatid)) { + if (Teapot::Bot::Object::ChatPermissions->canTalk ($self, $chatid)) { return $self->_brain->sendChatAction({chat_id => $chatid}); }