TT#6831 handle sms legacy currency sign

we store it as is. but in order to preserve all information on callforwards,
we send those messages with the same coding as we receive them.

Change-Id: I3f72db4e19291aa2fb54d7aac000f88ad1874295
changes/85/9985/3
Gerhard Jungwirth 9 years ago
parent 5f1ee2632d
commit 47d1ff2d0b

@ -28,6 +28,7 @@ sub receive :Chained('list') :PathPart('receive') :Args(0) {
my $text = $c->req->params->{text} // "";
my $token = $c->req->params->{auth_token} // "";
my $charset = $c->req->params->{charset} // "";
my $coding = $c->req->params->{coding} // "";
my $decoded_text = '';
if ($charset && $charset =~ m/^utf-16/i) {
@ -160,6 +161,7 @@ sub receive :Chained('list') :PathPart('receive') :Args(0) {
caller => $to, # use the original to as new from
callee => $dst,
text => $text,
coding => $coding,
err_code => sub {$error_msg = shift;},
);
my $fwd_item = $c->model('DB')->resultset('sms_journal')->create({

@ -10,6 +10,7 @@ sub send_sms {
my $caller = $args{caller};
my $callee = $args{callee};
my $text = $args{text};
my $coding = $args{coding};
my $err_code = $args{err_code};
if (!defined $err_code || ref $err_code ne 'CODE') {
@ -30,8 +31,8 @@ sub send_sms {
);
my $uri = URI->new($fullpath);
$uri->query_form(
charset => "utf8",
coding => "2",
charset => "utf-8",
coding => $coding // "2",
user => "$user",
pass => "$pass",
text => $text,

Loading…
Cancel
Save