diff libpurple/protocols/novell/novell.c @ 24509:125cac3e24ee

The Add Buddy dialog should not blindly create a duplicate buddy in a group Fix up a subset of the prpls add_buddy functions to properly handle this situation. * Everything that comes before oscar alphabetically should work properly (except Gadu-Gadu and MSN, which need testing/another set of eyes)
author Paul Aurich <paul@darkrain42.org>
date Sat, 29 Nov 2008 18:46:49 +0000
parents e0bcb8cfda74
children 9b1310f1cc7c
line wrap: on
line diff
--- a/libpurple/protocols/novell/novell.c	Sat Nov 29 18:20:58 2008 +0000
+++ b/libpurple/protocols/novell/novell.c	Sat Nov 29 18:46:49 2008 +0000
@@ -2553,6 +2553,10 @@
 	if (!user->clist_synched)
 		return;
 
+	/* Don't re-add a buddy that is already on our contact list */
+	if (nm_find_user_record(user, buddy->name) == NULL)
+		return;
+
 	contact = nm_create_contact();
 	nm_contact_set_dn(contact, buddy->name);