diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-01 18:55:49 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-03 16:53:34 +0800 |
commit | ce0e19ff736d76b8064a006f8b8bf4c1baabda1b (patch) | |
tree | 92df98476d005ae476f7fc9071863a4082e93398 | |
parent | af568dcb51fab67c77f5540cc8351be3fe9809cc (diff) | |
download | gsoc2013-empathy-ce0e19ff736d76b8064a006f8b8bf4c1baabda1b.tar gsoc2013-empathy-ce0e19ff736d76b8064a006f8b8bf4c1baabda1b.tar.gz gsoc2013-empathy-ce0e19ff736d76b8064a006f8b8bf4c1baabda1b.tar.bz2 gsoc2013-empathy-ce0e19ff736d76b8064a006f8b8bf4c1baabda1b.tar.lz gsoc2013-empathy-ce0e19ff736d76b8064a006f8b8bf4c1baabda1b.tar.xz gsoc2013-empathy-ce0e19ff736d76b8064a006f8b8bf4c1baabda1b.tar.zst gsoc2013-empathy-ce0e19ff736d76b8064a006f8b8bf4c1baabda1b.zip |
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
-rw-r--r-- | 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 dd828fa68..6a163aaae 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); } } |