Set default action to "typing" if not supplied in sendChatAction()

This commit is contained in:
eleksir
2020-10-30 16:14:28 +03:00
parent 29c1fa8d07
commit f0b1ae9c43

View File

@@ -254,6 +254,11 @@ sub sendChatAction {
croak "no chat_id supplied in sendChatAction" unless $args->{chat_id};
$send_args->{chat_id} = $args->{chat_id};
unless (defined $args->{action}) {
$args->{action} = 'typing';
$send_args->{action} = 'typing';
}
if ($args->{action} eq 'upload_photo') {
$send_args->{action} = 'upload_photo';
}