Updated handling of '+' in phone numbers, it is now never stripped but expected: all numbers should be full international phone numbers (including in contacts.tsv).

Ensure contacts from modem and contacts lists are all fully qualified phone numbers (starting with + and carrying a country prefix). This effectively filters out older/incompatible entries.
This commit is contained in:
Maarten van Gompel 2020-08-02 12:01:25 +02:00 committed by Miles Alan
parent 7f2f50c11a
commit 565eae8835
4 changed files with 7 additions and 5 deletions
scripts/modem

View file

@ -64,7 +64,7 @@ sendtextmenu() {
awk NF |
menu sxmo_dmenu_with_kb.sh -p "Number" -fn "Terminus-20" -l 10 -c -i |
cut -d: -f1 |
tr -d -- '-+ '
tr -d -- '- '
)"
echo "$NUMBER" | grep -E "^Cancel$" && exit 1
echo "$NUMBER" | grep -qE '^[+0-9]+$' || err "That doesn't seem like a valid number"