# HG changeset patch # User Nathan Walp # Date 1105210699 0 # Node ID 84bc372a621edc3f5e9beb98fecd7dce54cf0929 # Parent 58ab47ed31bf318cbeb717294a0a5f3f0cf86c7b [gaim-migrate @ 11776] jabber status stuff committer: Tailor Script diff -r 58ab47ed31bf -r 84bc372a621e src/protocols/jabber/jabber.c --- a/src/protocols/jabber/jabber.c Sat Jan 08 18:53:49 2005 +0000 +++ b/src/protocols/jabber/jabber.c Sat Jan 08 18:58:19 2005 +0000 @@ -971,8 +971,11 @@ gaim_value_new(GAIM_TYPE_STRING), NULL); types = g_list_append(types, type); - type = gaim_status_type_new_with_attrs(GAIM_STATUS_ONLINE, "online", - _("Online"), TRUE, TRUE, FALSE, "priority", _("Priority"), + type = gaim_status_type_new_full(GAIM_STATUS_ONLINE, "online", _("Online"), FALSE, TRUE, FALSE); + types = g_list_append(types, type); + + type = gaim_status_type_new_with_attrs(GAIM_STATUS_AVAILABLE, "available", + _("Available"), TRUE, TRUE, FALSE, "priority", _("Priority"), gaim_value_new(GAIM_TYPE_INT), "message", _("Message"), gaim_value_new(GAIM_TYPE_STRING), NULL); types = g_list_append(types, type); diff -r 58ab47ed31bf -r 84bc372a621e src/protocols/jabber/presence.c --- a/src/protocols/jabber/presence.c Sat Jan 08 18:53:49 2005 +0000 +++ b/src/protocols/jabber/presence.c Sat Jan 08 18:58:19 2005 +0000 @@ -97,6 +97,9 @@ JabberBuddyState state; int priority; + if(!gaim_status_is_active(status)) + return; + if(!account) return ; gc = account->gc; @@ -450,6 +453,29 @@ g_free(chat->handle); chat->handle = g_strdup(jid->resource); gaim_conv_chat_set_nick(GAIM_CONV_CHAT(chat->conv), jid->resource); + + /* + + + */ + /* expected response format: + + + + + + + */ + /* + * XXX: i'm not sure if we turn off XHTML unless we get + * xhtml back in this, or if we turn it off only if we + * get a response, and it's not there. Ask stpeter to + * clarify. + */ } jabber_buddy_track_resource(jb, jid->resource, priority, state, @@ -466,7 +492,7 @@ } g_free(room_jid); } else { - if(state != JABBER_BUDDY_STATE_ERROR && !(jb->subscription & JABBER_SUB_TO)) { + if(state != JABBER_BUDDY_STATE_ERROR && !(jb->subscription & JABBER_SUB_TO || jb->subscription & JABBER_SUB_PENDING)) { gaim_debug(GAIM_DEBUG_INFO, "jabber", "got unexpected presence from %s, ignoring\n", from); jabber_id_free(jid);