From 81c7d08f10d12edd2fe224c918e7eafb912c11c0 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Mon, 24 Feb 2020 13:22:05 +0100 Subject: Allow custom captions from document replies --- lib/TgLib/Api.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/TgLib') diff --git a/lib/TgLib/Api.pm b/lib/TgLib/Api.pm index 73aee4b..b0a66bf 100644 --- a/lib/TgLib/Api.pm +++ b/lib/TgLib/Api.pm @@ -64,11 +64,11 @@ sub send_message { } sub send_document { - my ($self, $chat_id, $photo) = @_; + my ($self, $chat_id, $photo, $caption) = @_; my $logger = $self->{'logger'}; my $uri = "$self->{'uri'}/sendDocument"; my $content = {'chat_id' => $chat_id, - 'caption' => 'Tenga, ayúdese', + 'caption' => $caption, 'document' => [undef, 'cosa.png', Content => $photo]}; my $req = POST $uri, 'Content-Type' => "multipart/form-data", 'Content' => $content; -- cgit v1.2.3