diff --git a/bin/out b/bin/out
index a052684..f27e69c 100755
--- a/bin/out
+++ b/bin/out
@@ -55,16 +55,19 @@ then
text="$(eval printf ${text} )"
[[ -z "${text}" ]] && text="_(missing notification text)_"
- text="$(echo -n "${text}" | jq -R -s .)"
- [ "${link}" == "true" ] && text="${text}"
+ [ "${link}" == "true" ] && formatted_body="${text}"
if [ -n "$prefix" ]; then
prefix="$(eval printf ${prefix} )"
text="${prefix}: ${text}"
+ [ -n "${formatted_body}" ] && formatted_body="${prefix}: ${formatted_body}"
fi
+ text="$(echo -n "${text}" | jq -R -s .)"
+ [ -n "${formatted_body}" ] && formatted_body="$(echo -n "${formatted_body}" | jq -R -s .)"
+
[[ "${token}" != "null" ]] && username="$(eval "printf ${token}" | jq -R -s .)"
- [[ "${room_id}" != "null" ]] && room_id="$(eval "printf ${room_id}" | jq -R -s .)"
+ [[ "${room_id}" != "null" ]] && room_id="$(eval "printf ${room_id}" | jq -R -s .)"
body="$(cat <