From 574509115cc616de3b159eea4e76f7fe1bd752f7 Mon Sep 17 00:00:00 2001 From: Stacy Harper Date: Fri, 18 Jun 2021 17:42:20 +0200 Subject: [PATCH] Prevent incompatible contact number to be added In the last commits I added the country code in the early stages of the phone numbe validation. I think it was a mistake as it make ad non prefixed phone number to be added in the tsv file. I revert this part here. --- scripts/core/sxmo_contactmenu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/core/sxmo_contactmenu.sh b/scripts/core/sxmo_contactmenu.sh index 6bcbf83..0d71631 100755 --- a/scripts/core/sxmo_contactmenu.sh +++ b/scripts/core/sxmo_contactmenu.sh @@ -4,13 +4,13 @@ . "$(dirname "$0")/sxmo_common.sh" valid_number() { - if pn valid ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$1"; then + if pn valid "$1"; then echo "$1" return fi REFORMATTED="$(pn find ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$1")" - if pn valid ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$REFORMATTED"; then + if pn valid "$REFORMATTED"; then echo "$REFORMATTED" return fi