diff libpurple/blist.c @ 29729:e26af064fe8c

added purple_contact_get_group
author Gary Kramlich <grim@reaperworld.com>
date Fri, 11 Dec 2009 01:32:16 +0000
parents 4055d0f7f1ea
children 4076f53cdd84 73b005a20d06
line wrap: on
line diff
--- a/libpurple/blist.c	Fri Dec 11 00:55:09 2009 +0000
+++ b/libpurple/blist.c	Fri Dec 11 01:32:16 2009 +0000
@@ -1739,6 +1739,14 @@
 	g_free(contact);
 }
 
+PurpleGroup *
+purple_contact_get_group(const PurpleContact *contact)
+{
+	g_return_val_if_fail(contact, NULL);
+
+	return (PurpleGroup *)(((PurpleBlistNode *)contact)->parent);
+}
+
 void purple_contact_set_alias(PurpleContact *contact, const char *alias)
 {
 	purple_blist_alias_contact(contact,alias);