Mercurial > hg
diff mcabber/mcabber/xmpp.c @ 1972:45f0f0f60656
Remove deprecated status invisible
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 19 Mar 2011 13:06:23 +0100 |
parents | 5d718766d2d6 |
children | e6beab22099b |
line wrap: on
line diff
--- a/mcabber/mcabber/xmpp.c Sat Mar 19 12:50:04 2011 +0100 +++ b/mcabber/mcabber/xmpp.c Sat Mar 19 13:06:23 2011 +0100 @@ -488,7 +488,9 @@ #endif xmpp_send_msg_no_chatstates: +#ifdef WITH_DEPRECATED_STATUS_INVISIBLE if (mystatus != invisible) +#endif update_last_use(); if (xep184 && *xep184) { lm_connection_send_with_reply(lconnection, x, *xep184, NULL); @@ -1931,7 +1933,13 @@ // (But we want to update internal status even when disconnected, // in order to avoid some problems during network failures) if (isonline) { +#ifdef WITH_DEPRECATED_STATUS_INVISIBLE const char *s_msg = (st != invisible ? msg : NULL); +#else + // XXX Could be removed if/when we get rid of status invisible + // completely. + const char *s_msg = msg; +#endif m = lm_message_new_presence(st, recipient, s_msg); xmpp_insert_entity_capabilities(m->node, st); // Entity Caps (XEP-0115) #ifdef HAVE_GPGME @@ -1955,7 +1963,10 @@ if (isonline) { // Send presence to chatrooms - if (st != invisible) { +#ifdef WITH_DEPRECATED_STATUS_INVISIBLE + if (st != invisible) +#endif + { struct T_presence room_presence; room_presence.st = st; room_presence.msg = msg; @@ -1970,7 +1981,11 @@ update_roster = TRUE; if (isonline || mystatus || st) +#ifdef WITH_DEPRECATED_STATUS_INVISIBLE hk_mystatuschange(0, mystatus, st, (st != invisible ? msg : "")); +#else + hk_mystatuschange(0, mystatus, st, msg); +#endif mystatus = st; }