changeset 18307:4434e5c9d247

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
author Sean Egan <seanegan@gmail.com>
date Wed, 27 Jun 2007 18:11:30 +0000
parents a3469318cf35
children 4c3a24270114 7a8283c1eb75
files libpurple/protocols/jabber/presence.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);
 		}