introduce priority support

add new command /priority <int>
improve jabber_update_presence()
use jabber_update_presence() for sending initial presence
save priority and status string to jabber_conn structure
This commit is contained in:
Dmitry Podgorny
2012-11-13 12:51:28 +02:00
parent b14aab4ade
commit a114fe88b8
8 changed files with 118 additions and 11 deletions

View File

@@ -122,7 +122,7 @@ stanza_create_presence(xmpp_ctx_t *ctx, const char * const show,
xmpp_stanza_t *presence = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(presence, STANZA_NAME_PRESENCE);
if (strcmp(show, STANZA_TEXT_ONLINE) != 0) {
if (show != NULL) {
xmpp_stanza_t *show_stanza = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(show_stanza, STANZA_NAME_SHOW);
xmpp_stanza_t *text = xmpp_stanza_new(ctx);