From: Tomas Mudrunka Date: Tue, 24 Mar 2015 13:48:46 +0000 (+0100) Subject: better notification for chatrooms X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=8c4afbb588909d8f2619abcd18d5fce8cb2e983a;p=mirrors%2Flibpurple-core-answerscripts.git better notification for chatrooms --- diff --git a/purple/answerscripts.d/00-notify.sh b/purple/answerscripts.d/00-notify.sh index dc7033d..f0d7ee1 100755 --- a/purple/answerscripts.d/00-notify.sh +++ b/purple/answerscripts.d/00-notify.sh @@ -1,4 +1,5 @@ #!/bin/sh #Show notification for each incomming message ANSW_MSG="$(echo "$ANSW_MSG" | sed -e 's/&/&\;/g;s//\>/g')" -notify-send -i pidgin "$ANSW_PROTOCOL:$ANSW_R_NAME" "$ANSW_MSG" +[ -n "$ANSW_R_ROOM_NAME" ] && room="$ANSW_R_ROOM_NAME:" || room='' +notify-send -i pidgin "$ANSW_PROTOCOL:$room$ANSW_R_ALIAS" "$ANSW_MSG"