Mercurial > pidgin
comparison libpurple/protocols/yahoo/yahoo.c @ 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 | cd4173014f50 |
children | 665e04562de0 |
comparison
equal
deleted
inserted
replaced
21536:fd101c75472f | 21537:9dbf38f270da |
---|---|
900 | 900 |
901 if (!strcmp(m, "<ding>")) { | 901 if (!strcmp(m, "<ding>")) { |
902 PurpleBuddy *buddy; | 902 PurpleBuddy *buddy; |
903 PurpleAccount *account; | 903 PurpleAccount *account; |
904 PurpleConversation *c; | 904 PurpleConversation *c; |
905 char *username, *str; | 905 char *username; |
906 | |
907 str = NULL; | |
908 | 906 |
909 account = purple_connection_get_account(gc); | 907 account = purple_connection_get_account(gc); |
910 c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, im->from); | 908 c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, im->from, account); |
909 if (c == NULL) | |
910 c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, im->from); | |
911 | 911 |
912 if ((buddy = purple_find_buddy(account, im->from)) != NULL) | 912 if ((buddy = purple_find_buddy(account, im->from)) != NULL) |
913 username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1); | 913 username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1); |
914 else | 914 else |
915 username = g_markup_escape_text(im->from, -1); | 915 username = g_markup_escape_text(im->from, -1); |
916 | 916 |
917 serv_got_attention(gc, username, YAHOO_BUZZ); | 917 serv_got_attention(gc, username, YAHOO_BUZZ); |
918 | 918 |
919 g_free(username); | 919 g_free(username); |
920 g_free(str); | |
921 g_free(m); | 920 g_free(m); |
922 g_free(im); | 921 g_free(im); |
923 continue; | 922 continue; |
924 } | 923 } |
925 | 924 |
2095 while (l) { | 2094 while (l) { |
2096 struct yahoo_pair *pair = l->data; | 2095 struct yahoo_pair *pair = l->data; |
2097 | 2096 |
2098 if (pair->key == 66) | 2097 if (pair->key == 66) |
2099 err = strtol(pair->value, NULL, 10); | 2098 err = strtol(pair->value, NULL, 10); |
2100 if (pair->key == 20) | 2099 else if (pair->key == 20) |
2101 url = pair->value; | 2100 url = pair->value; |
2102 | 2101 |
2103 l = l->next; | 2102 l = l->next; |
2104 } | 2103 } |
2105 | 2104 |