[empathy] chat-manager: use tp_channel_join_async()



commit ce0e19ff736d76b8064a006f8b8bf4c1baabda1b
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue May 1 12:55:49 2012 +0200

    chat-manager: use tp_channel_join_async()
    
    It's basically the same as empathy_tp_chat_join()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=675229

 src/empathy-chat-manager.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-chat-manager.c b/src/empathy-chat-manager.c
index dd828fa..6a163aa 100644
--- a/src/empathy-chat-manager.c
+++ b/src/empathy-chat-manager.c
@@ -136,6 +136,22 @@ chat_destroyed_cb (gpointer data,
 }
 
 static void
+join_cb (GObject *source,
+    GAsyncResult *result,
+    gpointer user_data)
+{
+  TpChannel *channel = TP_CHANNEL (source);
+  GError *error = NULL;
+
+  if (!tp_channel_join_finish (channel, result, &error))
+    {
+      DEBUG ("Failed to join chat (%s): %s",
+          tp_channel_get_identifier (channel), error->message);
+      g_error_free (error);
+    }
+}
+
+static void
 process_tp_chat (EmpathyChatManager *self,
     EmpathyTpChat *tp_chat,
     TpAccount *account,
@@ -193,7 +209,7 @@ process_tp_chat (EmpathyChatManager *self,
     {
       /* We have been invited to the room. Add ourself as member as this
        * channel has been approved. */
-      empathy_tp_chat_join (tp_chat);
+      tp_channel_join_async (TP_CHANNEL (tp_chat), "", join_cb, self);
     }
 }
 



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