diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh index e1578ad39..b256390df 100755 --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -379,7 +379,7 @@ elif [ -z "${slacktoken}" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_script_error "Slack token not set" fi -if [ "${matrixalert}" == "on" ] && [ -n "${matrixtoken}" ] && [ -n "${matrixroom}" ]; then +if [ "${matrixalert}" == "on" ] && [ -n "${matrixhomeserver}" ] && [ -n "${matrixtoken}" ] && [ -n "${matrixroom}" ]; then alert_matrix.sh elif [ "${matrixalert}" != "on" ] && [ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "Matrix alerts not enabled" diff --git a/lgsm/modules/alert_matrix.sh b/lgsm/modules/alert_matrix.sh index dff3e0f5d..ab3f6e230 100755 --- a/lgsm/modules/alert_matrix.sh +++ b/lgsm/modules/alert_matrix.sh @@ -53,7 +53,7 @@ json="$(jq -cn --arg body "${message}" '{msgtype: "m.notice", body: $body}')" fn_print_dots "Sending Matrix alert" -matrixsend=$(curl --connect-timeout 10 -sS -X PUT \ +matrixsend=$(curl --connect-timeout 10 -sSL -X PUT \ -H "Authorization: Bearer ${matrixtoken}" \ -H "Content-Type: application/json" \ -d "${json}" \ diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index ce1a6f6d4..8752cf76b 100755 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -590,6 +590,11 @@ alert_ifttt.sh() { fn_fetch_module } +alert_matrix.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + alert_ntfy.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module