[Telepathy-commits] [telepathy-salut/master] tubes-channel: emit NewChannel when we create a new incoming muc stream tube
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Wed Mar 11 09:15:28 PDT 2009
---
src/salut-tubes-channel.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/salut-tubes-channel.c b/src/salut-tubes-channel.c
index fe500db..aeca446 100644
--- a/src/salut-tubes-channel.c
+++ b/src/salut-tubes-channel.c
@@ -49,6 +49,8 @@
#include "salut-connection.h"
#include "salut-contact.h"
#include "salut-muc-channel.h"
+#include "salut-muc-manager.h"
+#include "salut-tubes-manager.h"
#include "salut-xmpp-connection-manager.h"
#include "tube-iface.h"
#include "tube-dbus.h"
@@ -863,6 +865,21 @@ salut_tubes_channel_muc_message_received (SalutTubesChannel *self,
tube = create_new_tube (self, type, initiator_handle, FALSE, service, parameters,
tube_id, 0, NULL);
+ if (type == TP_TUBE_TYPE_STREAM)
+ {
+ /* FIXME: remove this test once D-Tube new API is
+ * implemented */
+ SalutMucManager *mgr;
+
+ g_object_get (priv->conn, "muc-manager", &mgr, NULL);
+ g_assert (mgr != NULL);
+
+ tp_channel_manager_emit_new_channel (mgr,
+ TP_EXPORTABLE_CHANNEL (tube), NULL);
+
+ g_object_unref (mgr);
+ }
+
/* the tube has reffed its initiator, no need to keep a ref */
tp_handle_unref (contact_repo, initiator_handle);
g_hash_table_destroy (parameters);
--
1.5.6.5
More information about the telepathy-commits
mailing list