From: <the...@us...> - 2006-07-06 08:24:29
|
Revision: 16442 Author: thekingant Date: 2006-07-06 01:24:26 -0700 (Thu, 06 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16442&view=rev Log Message: ----------- It is currently possible for yourself to not show up in your own buddy list at signon with Jabber. To reproduce: 1. Sign on and add yourself to your buddy list 2. Sign off and exit Gaim 3. Delete your blist.xml 4. Sign on The same bug would also appear when signing into your Jabber account using Gaim for the first time. Normally this works because the Jabber PRPL fakes showing your status whenever jabber_presence_send() is called. However, the call to jabber_presence_send() can happen BEFORE we receive the roster from the server (it usually does, I think) so the PRPL tries to set the status for yourself, but your GaimBuddy node doesn't exist yet. Modified Paths: -------------- trunk/src/protocols/jabber/roster.c Modified: trunk/src/protocols/jabber/roster.c =================================================================== --- trunk/src/protocols/jabber/roster.c 2006-07-06 08:11:47 UTC (rev 16441) +++ trunk/src/protocols/jabber/roster.c 2006-07-06 08:24:26 UTC (rev 16442) @@ -56,6 +56,7 @@ const char *alias, GSList *groups) { GSList *buddies, *g2, *l; + gchar *my_bare_jid; buddies = gaim_find_buddies(js->gc->account, jid); @@ -68,6 +69,8 @@ return; } + my_bare_jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain); + while(buddies) { GaimBuddy *b = buddies->data; GaimGroup *g = gaim_buddy_get_group(b); @@ -100,10 +103,27 @@ gaim_blist_add_buddy(b, NULL, g, NULL); gaim_blist_alias_buddy(b, alias); + + + /* If we just learned about ourself, then fake our status, + * because we won't be receiving a normal presence message + * about ourself. */ + if(!strcmp(b->name, my_bare_jid)) { + GaimPresence *gpresence; + GaimStatus *status; + + gpresence = gaim_account_get_presence(js->gc->account); + status = gaim_presence_get_active_status(gpresence); + jabber_presence_fake_to_self(js, status); + } + + + g_free(g2->data); g2 = g_slist_delete_link(g2, g2); } + g_free(my_bare_jid); g_slist_free(buddies); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |