# HG changeset patch # User Sean Egan # Date 1182967890 0 # Node ID 4434e5c9d247dcd96616926c82c994d86b75388a # Parent a3469318cf355d616c0d3d55fafccb1597abd6ef When an XMPP buddy signs off, show the status of the currently highest priority buddy, rather than the status of the signed off buddy. Fixes #1126 diff -r a3469318cf35 -r 4434e5c9d247 libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Wed Jun 27 17:24:32 2007 +0000 +++ b/libpurple/protocols/jabber/presence.c Wed Jun 27 18:11:30 2007 +0000 @@ -558,6 +558,7 @@ jabber_buddy_remove_resource(jb, jid->resource); if((conv = jabber_find_unnormalized_conv(from, js->gc->account))) purple_conversation_set_name(conv, buddy_name); + printf("Removed resource\n"); } else { jbr = jabber_buddy_track_resource(jb, jid->resource, priority, @@ -565,7 +566,7 @@ } if((found_jbr = jabber_buddy_find_resource(jb, NULL))) { - purple_prpl_got_user_status(js->gc->account, buddy_name, jabber_buddy_state_get_status_id(state), "priority", found_jbr->priority, found_jbr->status ? "message" : NULL, found_jbr->status, NULL); + purple_prpl_got_user_status(js->gc->account, buddy_name, jabber_buddy_state_get_status_id(found_jbr->state), "priority", found_jbr->priority, found_jbr->status ? "message" : NULL, found_jbr->status, NULL); } else { purple_prpl_got_user_status(js->gc->account, buddy_name, "offline", status ? "message" : NULL, status, NULL); }