2 # configversion: 72930bc53d64a3cce0338cf500d019a0
3 # SPDX-License-Identifier: AGPL-3.0-only
4 # Copyright 2022 Sxmo Contributors
6 # This script is executed after you received a text, mms, or vvm
7 # You can use it to play a notification sound or forward the sms elsewhere
9 # The following parameters are provided:
10 # $1 = Contact Name or Number (if number not in contacts)
11 # $2 = Text (or 'VVM' if a vvm)
12 # mms and vvm will include these parameters:
13 # $3 = MMS or VVM payload ID
14 # Finally, mms may include this parameter:
15 # $4 = Group Contact Name or Number (if number not in contacts)
17 # shellcheck source=scripts/core/sxmo_common.sh
20 echo $( date +%Y-%m-%dT%H:%M%S ) "SMS $*" >> XDG_STATE_HOME/sms.log # XXX dpavlin - log sms messages
22 if grep "$1" ~user/sms-ssh-number ; then
26 # do nothing if active call
27 if ! sxmo_modemcall.sh list_active_calls | grep -q active; then
29 if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ]; then
30 mpv --no-resume-playback --quiet --no-video "$SXMO_TEXTSOUND" >> /dev/null 2>&1
33 if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then