浏览代码

Show username in notification

Bob Mottram 8 年前
父节点
当前提交
1a8250f2b1
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      src/meshavahi

+ 2
- 1
src/meshavahi 查看文件

@@ -150,7 +150,8 @@ function detect_new_tox_users {
150 150
             if [[ $line != "Failed*" && $line != "data "* && $line != "Anon "* && $line != "anon "* ]]; then
151 151
                 if ! grep -q "$line" $PREV_TOX_USERS_FILE; then
152 152
                     # get the nick of the user
153
-                    toxuser="$(echo "$line" | awk -F ' ' '{print $1}')"
153
+                    toxidstr=$(echo "$line" | awk '{print $(NF)}')
154
+                    toxuser=$(echo "$line" | sed "s| $toxidstr||g")
154 155
 
155 156
                     if [ -r "/home/$MESH_USERNAME/.dbus/Xdbus" ]; then
156 157
                         . "/home/$MESH_USERNAME/.dbus/Xdbus"