diff finch/gntblist.c @ 26479:f5f08111da52

propagate from branch 'im.pidgin.pidgin' (head a609160715ae18beed98b084aac19bc0f6551362) to branch 'im.pidgin.pidgin.vv' (head 6e683319559d829234bc548e0795ed03403af478)
author Mike Ruprecht <maiku@soc.pidgin.im>
date Wed, 01 Apr 2009 04:25:37 +0000
parents 9ea3474065dc
children 8df78c06d10e
line wrap: on
line diff
--- a/finch/gntblist.c	Wed Apr 01 04:24:11 2009 +0000
+++ b/finch/gntblist.c	Wed Apr 01 04:25:37 2009 +0000
@@ -643,10 +643,14 @@
 		purple_blist_add_group(grp, NULL);
 	}
 
-	/* XXX: Ask if there's already the same buddy in the same group (#4553) */
-
-	buddy = purple_buddy_new(account, username, alias);
-	purple_blist_add_buddy(buddy, NULL, grp, NULL);
+	/* XXX: Ask to merge if there's already a buddy with the same alias in the same group (#4553) */
+
+	if ((buddy = purple_find_buddy_in_group(account, username, grp)) == NULL)
+	{
+		buddy = purple_buddy_new(account, username, alias);
+		purple_blist_add_buddy(buddy, NULL, grp, NULL);
+	}
+
 	purple_account_add_buddy(account, buddy);
 }