]> git.0d.be Git - empathy.git/blobdiff - libempathy/gossip-contact.c
Fix indentation Fix not returning the contact in tp_contact_list_find()
[empathy.git] / libempathy / gossip-contact.c
index 68be90cd970d15f2e6a058d0e011095b7249ff15..51015f3653744910f5bba9073caee1bf9e74985d 100644 (file)
@@ -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)