matrix-commander html+newline

This commit is contained in:
olli 2024-08-19 09:50:48 +02:00
parent fbaf5caba7
commit 559272409e

View File

@ -780,7 +780,7 @@
matrix_message=$(echo "${subj}<br>${orig_message}")
matrix_target="/usr/local/share/$(hostname).fifo"
[ -n "$togroup" ] && [ -p "/usr/local/share/$(hostname)-${togroup}.fifo" ] && matrix_target="/usr/local/share/$(hostname)-${togroup}.fifo"
echo "$matrix_message" >"$matrix_target"
echo "$matrix_message" | perl -pe 's/\n/<br>/' | perl -pe 's/\<br\>$/\n/; s/^\<br\>//;' >"$matrix_target"
else
sudo /usr/bin/docker compose -f /home/docker/matrix.$(hostname)/docker-compose.yml run -T matrix.$(hostname)--commander -m "$message" -k --room $room --log-level WARNING WARNING
fi