[empathy] empathy_tp_chat_is_invited: use new channel group API



commit 73b1e75262d87d78602b6c8cc6c9bec8aa875f0b
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed May 2 11:28:43 2012 +0200

    empathy_tp_chat_is_invited: use new channel group API
    
    https://bugzilla.gnome.org/show_bug.cgi?id=675229

 libempathy/empathy-tp-chat.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 9d86980..f66fe2d 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -1462,17 +1462,24 @@ gboolean
 empathy_tp_chat_is_invited (EmpathyTpChat *self,
     TpHandle *inviter)
 {
-  TpHandle self_handle;
+  TpContact *self_contact, *actor;
+  TpChannel *channel = TP_CHANNEL (self);
+  gboolean result;
 
   if (!tp_proxy_has_interface (self, TP_IFACE_CHANNEL_INTERFACE_GROUP))
     return FALSE;
 
-  self_handle = tp_channel_group_get_self_handle ((TpChannel *) self);
-  if (self_handle == 0)
+  self_contact = tp_channel_group_get_self_contact (channel);
+  if (self_contact == NULL)
     return FALSE;
 
-  return tp_channel_group_get_local_pending_info ((TpChannel *) self,
-      self_handle, inviter, NULL, NULL);
+  result = tp_channel_group_get_local_pending_contact_info (channel,
+      self_contact, &actor, NULL, NULL);
+
+  if (inviter != NULL)
+    *inviter = tp_contact_get_handle (actor);
+
+  return result;
 }
 
 TpChannelChatState



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]