aboutsummaryrefslogtreecommitdiff
path: root/lib/TgLib
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TgLib')
-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;