aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGuillermo Ramos2020-02-24 13:22:05 +0100
committerGuillermo Ramos2020-02-24 13:22:05 +0100
commit81c7d08f10d12edd2fe224c918e7eafb912c11c0 (patch)
tree1a8f2b71df637501c012c8fd7403d30bed70b758 /lib
parent51ffaecc06021d40908eec179b4395953a912cdb (diff)
downloadtgutils-81c7d08f10d12edd2fe224c918e7eafb912c11c0.tar.gz
Allow custom captions from document replies
Diffstat (limited to 'lib')
-rw-r--r--lib/TgLib/Api.pm4
1 files changed, 2 insertions, 2 deletions
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;