Skip to content

Commit

Permalink
use POST for getFile
Browse files Browse the repository at this point in the history
  • Loading branch information
stargo committed Jan 7, 2018
1 parent c5b0db1 commit 931cc35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion telegram.pl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ sub telegram_handle_message {
if (defined($file) && defined($baseURL) && defined($localPath)) {
print("Requesting ".$file) if ($debug);
$data->{file_id} = $file;
telegram_https("/bot${token}/getFile?file_id=${file}", undef, undef, $data);
my $body = { file_id => $file };
telegram_https("/bot${token}/getFile", encode_json($body), undef, $data);
}

telegram_send_message($user, "Unsupported message type!") if (!defined($file));
Expand Down

0 comments on commit 931cc35

Please sign in to comment.