Mercurial > pidgin
changeset 21537:9dbf38f270da
Fix #3421 by checking for an existing conversation in which to display a yahoo buzz.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 16 Nov 2007 01:59:59 +0000 |
parents | fd101c75472f |
children | 4e5bef6c3379 |
files | libpurple/protocols/yahoo/yahoo.c |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c Fri Nov 16 01:39:53 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Fri Nov 16 01:59:59 2007 +0000 @@ -902,12 +902,12 @@ PurpleBuddy *buddy; PurpleAccount *account; PurpleConversation *c; - char *username, *str; - - str = NULL; + char *username; account = purple_connection_get_account(gc); - c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, im->from); + c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, im->from, account); + if (c == NULL) + c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, im->from); if ((buddy = purple_find_buddy(account, im->from)) != NULL) username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1); @@ -917,7 +917,6 @@ serv_got_attention(gc, username, YAHOO_BUZZ); g_free(username); - g_free(str); g_free(m); g_free(im); continue; @@ -2097,7 +2096,7 @@ if (pair->key == 66) err = strtol(pair->value, NULL, 10); - if (pair->key == 20) + else if (pair->key == 20) url = pair->value; l = l->next;