From: Thomas Berezansky Date: Tue, 2 Oct 2012 17:31:13 +0000 (-0400) Subject: SMS Number Munging X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b184ec75fd09c39a846c6bd1870696b691a24b0e;p=working%2FEvergreen.git SMS Number Munging Munge "pretty printed" numbers into raw sets of digits in the A/T helper. This allows aliases to still work for services that support them. Signed-off-by: Thomas Berezansky --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm index a56a2cd9fe..81613174cb 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm @@ -323,6 +323,12 @@ $_TT_helpers = { }; my $carriers = new_editor()->json_query($query); + # If this looks like a pretty-formatted number drop the pretty-formatting + # Otherwise assume it may be a literal alias instead of a real number + if ($sms_notify =~ m/^[- ()0-9]*$/) { + $sms_notify =~ s/[- ()]//g; + } + my @addresses = (); foreach my $carrier ( @{ $carriers } ) { my $address = $carrier->{email_gateway};