changeset 16811:a77901ef0ebb

this should fix jabber buddy icons (but it will re-introduce the behavior of overwriting your vCard whenever you sign in). Until we get pubsub icons going, this is how we're gonna be stuck.
author Nathan Walp <nwalp@pidgin.im>
date Thu, 03 May 2007 12:04:04 +0000
parents ffd962a5d9dc
children c6ca9e25814b
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Thu May 03 01:30:12 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Thu May 03 12:04:04 2007 +0000
@@ -1030,6 +1030,8 @@
 
 void jabber_stream_set_state(JabberStream *js, JabberStreamState state)
 {
+	PurpleStoredImage *img;
+
 	js->state = state;
 	switch(state) {
 		case JABBER_STREAM_OFFLINE:
@@ -1055,12 +1057,19 @@
 		case JABBER_STREAM_REINITIALIZING:
 			purple_connection_update_progress(js->gc, _("Re-initializing Stream"),
 					(js->gsc ? 7 : 4), JABBER_CONNECT_STEPS);
-			
+
 			/* The stream will be reinitialized later, in jabber_recv_cb_ssl() */
 			js->reinit = TRUE;
-			
+
 			break;
 		case JABBER_STREAM_CONNECTED:
+			/* lets make sure our buddy icon is up to date
+			 * before we go letting people know we're here */
+			img = purple_buddy_icons_find_account_icon(js->gc->account);
+			jabber_set_buddy_icon(js->gc, img);
+			purple_imgstore_unref(img);
+
+			/* now we can alert the core that we're ready to send status */
 			purple_connection_set_state(js->gc, PURPLE_CONNECTED);
 			jabber_disco_items_server(js);
 			break;