Rework of the sxmo_modemtext with benefit

* Draft files are assigned to each number:

Stored here ".local/share/modem/+33666666666/draft.txt"
We automatically edit this single file, making crash or unexpected
edition issue to leave intact saved draft.

* Simplification of some logics

Having a known draft file instead of using a TEXT var simplify lots
of things

* EDITOR is not run in a subshell

Some editors as kakoune got issues with that. Futhermore, it will be
usefull for some other development as making all menu ssh mode
compatible

* Remove modem check

As we now got draft, why do we care if modem is up or down ?

* Display the contact name instead of it number in the conversation

Or use "Unknown Number (+337798676)"

* Unify display message notif adding possibilities to bypass the
main menu

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Stacy Harper 2021-04-05 11:56:08 +02:00 committed by Maarten van Gompel
parent 016363dd57
commit 262418637f
3 changed files with 63 additions and 80 deletions

View file

@ -172,7 +172,7 @@ checkfornewtexts() {
sxmo_notificationwrite.sh \
random \
"st -T '$NUM SMS' -e tail -n9999 -f '$LOGDIR/$NUM/sms.txt'" \
"sxmo_modemtext.sh tailtextlog $NUM" \
"$LOGDIR/$NUM/sms.txt" \
"Message - $CONTACTNAME: $TEXT"