#!/usr/bin/env -S bash -e [[ -z "$1" ]] && { printf "Usage: %s message [description]\n" "$0" exit 1 } TxnId() { # Random chars. Needed for sending messages. I am not using tr on /dev/urandom for speed reasons CharRange='1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' for ((i = 0; i <= 32; i++)); do printf '%s' "${CharRange:$((RANDOM % ${#CharRange})):1}" done } instance='https://mtrx.vern.cc' RoomId='!TvCDlIfMEHfcpCrSow:vern.cc' if [[ -z ${2} ]]; then curl -s \ -X PUT \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer '"$(