changeset 24926:6f1f809d6fa2

Use purple_buddy_get_group() instead of aim_ssi_itemlist_exists() to check if the buddy is in our list or not. Should be much more efficient.
author Mark Doliner <mark@kingant.net>
date Fri, 09 Jan 2009 02:43:38 +0000
parents ded121a7fbb6
children fa055be807bf
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Fri Jan 09 01:45:45 2009 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Fri Jan 09 02:43:38 2009 +0000
@@ -6200,8 +6200,9 @@
 		menu = g_list_prepend(menu, act);
 	}
 
-	if (aim_ssi_itemlist_exists(od->ssi.local, buddy->name) != NULL)
+	if (purple_buddy_get_group(buddy) != NULL)
 	{
+		/* We only do this if the user is in our buddy list */
 		act = purple_menu_action_new(_("Edit Buddy Comment"),
 		                           PURPLE_CALLBACK(oscar_buddycb_edit_comment),
 		                           NULL, NULL);
@@ -6240,7 +6241,7 @@
 #endif
 	}
 
-	if (od->ssi.received_data)
+	if (od->ssi.received_data && purple_buddy_get_group(buddy) != NULL)
 	{
 		char *gname;
 		gname = aim_ssi_itemlist_findparentname(od->ssi.local, buddy->name);