about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-11-07 10:25:31 +0100
committerMichael Vetter <jubalh@iodoru.org>2019-11-07 10:25:31 +0100
commitb846c4970bb8054ca2bacb8cebdbe4d9302f4cb6 (patch)
tree39f3a5d2411ea95946a8a120a732b94a741314ef /src/command/cmd_funcs.c
parentecfa2d0c1b96c4fbd8f9312c7afc2efae08568ed (diff)
downloadprofani-tty-b846c4970bb8054ca2bacb8cebdbe4d9302f4cb6.tar.gz
Fix setting of status message
Seems this actually never worked.
Now it does.

`/status set online "This is my text"`
`/status set away bye`
`/status set away`
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index f665bae1..4e3314ac 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -8078,8 +8078,12 @@ _update_presence(const resource_presence_t resource_presence,
 {
     char *msg = NULL;
     int num_args = g_strv_length(args);
+
+    // if no message, use status as message
     if (num_args == 2) {
         msg = args[1];
+    } else {
+        msg = args[2];
     }
 
     jabber_conn_status_t conn_status = connection_get_status();