From b184ec75fd09c39a846c6bd1870696b691a24b0e Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Tue, 2 Oct 2012 13:31:13 -0400 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm | 6 ++++++ 1 file changed, 6 insertions(+) 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}; -- 2.11.0