aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/gossip-contact.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/gossip-contact.c')
-rw-r--r--libempathy/gossip-contact.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libempathy/gossip-contact.c b/libempathy/gossip-contact.c
index 68be90cd9..51015f365 100644
--- a/libempathy/gossip-contact.c
+++ b/libempathy/gossip-contact.c
@@ -30,6 +30,7 @@
#include "gossip-contact.h"
#include "gossip-utils.h"
#include "gossip-debug.h"
+#include "empathy-contact-manager.h"
#define DEBUG_DOMAIN "Contact"
@@ -654,6 +655,24 @@ gossip_contact_get_status (GossipContact *contact)
return _("Offline");
}
+GossipContact *
+gossip_contact_get_user (GossipContact *contact)
+{
+ GossipContactPriv *priv;
+ EmpathyContactManager *manager;
+ GossipContact *user_contact;
+
+ g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
+
+ priv = GET_PRIV (contact);
+
+ manager = empathy_contact_manager_new ();
+ user_contact = empathy_contact_manager_get_user (manager, priv->account);
+ g_object_unref (manager);
+
+ return user_contact;
+}
+
gboolean
gossip_contact_equal (gconstpointer v1,
gconstpointer v2)