aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-01-10 00:13:04 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-10 00:13:04 +0800
commit4f5bfccceec4707e5e3a6ca3596ff9fb88507464 (patch)
treeb49bd3148dde333d76161393f806479abea06075 /libempathy-gtk
parent5436ecf05f66615d13540c19968361feda55c033 (diff)
downloadgsoc2013-empathy-4f5bfccceec4707e5e3a6ca3596ff9fb88507464.tar
gsoc2013-empathy-4f5bfccceec4707e5e3a6ca3596ff9fb88507464.tar.gz
gsoc2013-empathy-4f5bfccceec4707e5e3a6ca3596ff9fb88507464.tar.bz2
gsoc2013-empathy-4f5bfccceec4707e5e3a6ca3596ff9fb88507464.tar.lz
gsoc2013-empathy-4f5bfccceec4707e5e3a6ca3596ff9fb88507464.tar.xz
gsoc2013-empathy-4f5bfccceec4707e5e3a6ca3596ff9fb88507464.tar.zst
gsoc2013-empathy-4f5bfccceec4707e5e3a6ca3596ff9fb88507464.zip
Use new dispatcher API to get muc channels
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2145
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index d05c8591d..a1787189a 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -40,6 +40,7 @@
#include <libempathy/empathy-log-manager.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-dispatcher.h>
#include "empathy-chat.h"
#include "empathy-conf.h"
@@ -179,21 +180,21 @@ chat_connection_changed_cb (EmpathyAccountManager *manager,
if (current == TP_CONNECTION_STATUS_CONNECTED && !priv->tp_chat &&
empathy_account_equal (account, priv->account) &&
priv->handle_type != TP_HANDLE_TYPE_NONE) {
- TpConnection *connection;
- MissionControl *mc;
-
+
DEBUG ("Account reconnected, request a new Text channel");
- mc = empathy_mission_control_new ();
- connection = mission_control_get_tpconnection (mc, account, NULL);
- tp_connection_run_until_ready (connection, FALSE, NULL, NULL);
- empathy_connection_request_channel (connection, -1,
- TP_IFACE_CHANNEL_TYPE_TEXT,
- priv->handle_type,
- priv->id, TRUE,
- NULL, NULL, NULL, NULL);
- g_object_unref (connection);
- g_object_unref (mc);
+ switch (priv->handle_type) {
+ case TP_HANDLE_TYPE_CONTACT:
+ empathy_dispatcher_chat_with_contact_id (account, unique_name,
+ NULL, NULL);
+ break;
+ case TP_HANDLE_TYPE_ROOM:
+ empathy_dispatcher_join_muc (account, unique_name, NULL, NULL);
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
}
}