From 73b1e75262d87d78602b6c8cc6c9bec8aa875f0b Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 2 May 2012 11:28:43 +0200 Subject: [PATCH] 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 file changed, 12 insertions(+), 5 deletions(-) diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 9d869809..f66fe2d7 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 -- 2.39.2