Using "/status invisible -" did not clear the status message
authorMikael Berthe <mikael@lilotux.net>
Sat, 28 Jan 2006 11:07:02 +0100
changeset 677 633a0522bd37
parent 676 80d4959422ca
child 678 e175f5d96f04
Using "/status invisible -" did not clear the status message Thanks to pmw for the report. Now the general status message is updated even when the requested status is "invisible".
mcabber/src/commands.c
mcabber/src/jabglue.c
--- a/mcabber/src/commands.c	Thu Jan 26 23:14:17 2006 +0100
+++ b/mcabber/src/commands.c	Sat Jan 28 11:07:02 2006 +0100
@@ -462,11 +462,10 @@
     return;
   }
 
-  // Use provided message, unless requested status is "invisible"
-  if (msg && st != invisible) {
-    if (!*msg) msg = NULL;
-  } else
+  // Use provided message
+  if (msg && !*msg) {
     msg = NULL;
+  }
 
   // If a recipient is specified, let's don't use default status messages
   if (recipient && !msg)
--- a/mcabber/src/jabglue.c	Thu Jan 26 23:14:17 2006 +0100
+++ b/mcabber/src/jabglue.c	Sat Jan 28 11:07:02 2006 +0100
@@ -347,7 +347,7 @@
     }
   }
 
-  x = presnew(st, recipient, msg);
+  x = presnew(st, recipient, (st != invisible ? msg : NULL));
   jab_send(jc, x);
   xmlnode_free(x);
 
@@ -366,7 +366,7 @@
   if (mystatus == offline || st == offline)
     update_roster = TRUE;
 
-  hk_mystatuschange(0, mystatus, st, msg);
+  hk_mystatuschange(0, mystatus, st, (st != invisible ? msg : ""));
   mystatus = st;
   if (msg != mystatusmsg) {
     if (mystatusmsg)