Fixup inconsistent usage of default country on phone numbers

master
Stacy Harper 4 years ago
parent 03b7a9d59f
commit 469f7cbd13
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 6
      configs/appcfg/xinit_template
  2. 4
      scripts/core/sxmo_contactmenu.sh

@ -25,9 +25,9 @@ amixer set "Line Out" 50%
#mpv --quiet --no-video ~/welcome.ogg & #mpv --quiet --no-video ~/welcome.ogg &
# You will sometime get SMS or calls from not # You will sometime get SMS or calls from not
# country code prefixed phone numbers. To ensure # country code prefixed phone numbers. To make
# we match your contacts, we will use this one. # it easy to fixup configure the default countryu.
#export DEFAULT_NUMBER_PREFIX=+33 #export DEFAULT_COUNTRY=FR
# turn on modemmonitor on login # turn on modemmonitor on login
# Note: if the modemmonitor is not on you can # Note: if the modemmonitor is not on you can

@ -4,13 +4,13 @@
. "$(dirname "$0")/sxmo_common.sh" . "$(dirname "$0")/sxmo_common.sh"
valid_number() { valid_number() {
if pn valid "$1"; then if pn valid ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$1"; then
echo "$1" echo "$1"
return return
fi fi
REFORMATTED="$(pn find ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$1")" REFORMATTED="$(pn find ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$1")"
if pn valid "$REFORMATTED"; then if pn valid ${DEFAULT_COUNTRY:+-c "$DEFAULT_COUNTRY"} "$REFORMATTED"; then
echo "$REFORMATTED" echo "$REFORMATTED"
return return
fi fi

Loading…
Cancel
Save