]> git.0d.be Git - empathy.git/commitdiff
empathy_tp_chat_is_invited: use new channel group API
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 2 May 2012 09:28:43 +0000 (11:28 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 3 May 2012 08:53:34 +0000 (10:53 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=675229

libempathy/empathy-tp-chat.c

index 9d86980962c7fbd7490dd92164a7a9b2ef5d5f23..f66fe2d7cb4989c3f6866292859bd27b63725ac6 100644 (file)
@@ -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