diff --git a/tools/bin/tp b/tools/bin/tp
index c553346..c6a6590 100755
--- a/tools/bin/tp
+++ b/tools/bin/tp
@@ -8,6 +8,14 @@ if [ -f "$(pwd)/.env" ]; then
. "$(pwd)/.env"
fi
+if [ -z "$MXID" ]; then
+ MXID="@(${USER}:$(hostname)"
+fi
+
+if [ -z "$DISPLAY_NAME" ]; then
+ DISPLAY_NAME=$(getent passwd "$USER" | cut -d ':' -f 5 | cut -d ',' -f 1)
+fi
+
if [ -z "$TELODENDRIA_PUB" ]; then
echo "TELODENDRIA_PUB not set."
exit 1
@@ -107,7 +115,7 @@ case "$1" in
msgFile="/tmp/patchmsg-$(date +%s).txt"
$EDITOR "$msgFile"
if [ -f "$msgFile" ]; then
- msg="$msg
$(cat $msgFile)" + msg="$msg
$(cat $msgFile)" fi matrix_send "$msg" else
—$DISPLAY_NAME ($MXID)