summaryrefslogtreecommitdiff
path: root/finch/gntblist.c
diff options
context:
space:
mode:
Diffstat (limited to 'finch/gntblist.c')
-rw-r--r--finch/gntblist.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/finch/gntblist.c b/finch/gntblist.c
index 949d5b76b0..0b4ff7f7bd 100644
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -643,10 +643,14 @@ add_buddy_cb(void *data, PurpleRequestFields *allfields)
purple_blist_add_group(grp, NULL);
}
- /* XXX: Ask if there's already the same buddy in the same group (#4553) */
+ /* 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);
+ }
- buddy = purple_buddy_new(account, username, alias);
- purple_blist_add_buddy(buddy, NULL, grp, NULL);
purple_account_add_buddy(account, buddy);
}