From 931cc35486a1338c5ea928e929be34b683b751ee Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sun, 7 Jan 2018 10:37:43 +0100 Subject: [PATCH] use POST for getFile --- telegram.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telegram.pl b/telegram.pl index 9b4d76d..4538b8e 100644 --- a/telegram.pl +++ b/telegram.pl @@ -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));