Subject: | No long SMS available / patch attached |
Date: | Sun, 19 Oct 2014 22:10:34 +0200 |
To: | bug-SMS-Send-Smstrade [...] rt.cpan.org |
From: | Dominic Sonntag <dominic [...] s5g.de> |
Hi,
I want to the driver for Smstrade to also send long ("concatenated")
SMS, but there is a hard-coded substring cutting off everything after
the first 160 characters.
Take a look at my following patch which should solve this correctly.
Thanks
Dominic
--- Smstrade.pm 2014-10-19 19:58:58.000000000 +0000
+++ Smstrade.pm.patched 2014-10-19 19:56:59.000000000 +0000
@@ -167,7 +167,7 @@
my %params = @_;
my $destination = $self->_clean_number($params{to});
- my $message = substr($params{text},0,159);
+ my $message = $params{text};
my %args = (
'key' => $self->{_apikey},
@@ -175,6 +175,7 @@
'to' => $destination,
'route' => $self->{_route},
'from' => $self->{_from},
+ 'concat' => length($message) > 160 ? 1 : 0,
'cost' => 1,
'message_id' => 1,
'count' => 1,