|
|
@ -23,7 +23,6 @@ matrix_server_url="$(jq -r '.source.matrix_server_url' < "${payload}")" |
|
|
|
token="$(jq -r '.source.token' < "${payload}")" |
|
|
|
room_id="$(jq -r '.source.room_id' < "${payload}")" |
|
|
|
msgtype="$(jq -r '.source.msgtype // "m.notice"' < "${payload}")" |
|
|
|
is_html="$(jq -r '.source.is_html // "false"' < "${payload}")" |
|
|
|
data_file="$(jq -r '.source.data_file // ""' < "${payload}")" |
|
|
|
|
|
|
|
ts="$(date +%s)" |
|
|
@ -45,6 +44,7 @@ silent="$(jq -r '.params.silent // "true"' < "${payload}")" |
|
|
|
link="$(jq -r '.params.link // "false"' < "${payload}")" |
|
|
|
team="$(jq -r '.params.team // "main"' < "${payload}")" |
|
|
|
prefix="$(jq -r '.params.prefix // ""' < "${payload}")" |
|
|
|
is_html="$(jq -r '.params.is_html // "false"' < "${payload}")" |
|
|
|
|
|
|
|
|
|
|
|
TEXT_FILE_CONTENT="" |
|
|
@ -74,7 +74,7 @@ then |
|
|
|
text=$(echo -n "${text}" | jq -R -s .) |
|
|
|
[ -n "${formatted_body}" ] && formatted_body=$(echo -n "${formatted_body}" | jq -R -s .) |
|
|
|
|
|
|
|
if [[ "${is_html}" = "true" ]]; then |
|
|
|
if [[ "${is_html}" == "true" ]]; then |
|
|
|
formatted_body="${text}" |
|
|
|
fi |
|
|
|
|
|
|
|