summaryrefslogtreecommitdiff
path: root/src/muc-factory.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-10-04 13:12:39 +0100
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-10-04 17:05:12 +0100
commit4637484112ab53aa2d80ac8b4629aecf8dc0536e (patch)
treee286aec221a86a2b035f7726edfb1056a0ce39cd /src/muc-factory.c
parent30ca6f73177b1689b566d0f43774af71aae4f5e5 (diff)
downloadtelepathy-gabble-4637484112ab53aa2d80ac8b4629aecf8dc0536e.tar.gz
Don't announce new tubes channel until the muc is ready
When the muc becomes ready it will announce both the text channel and tubes channels if applicable, so don't directly announce muc tubes before the muc is ready. Closes: #28279
Diffstat (limited to 'src/muc-factory.c')
-rw-r--r--src/muc-factory.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/muc-factory.c b/src/muc-factory.c
index 00e1b0da7..c0c652f87 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -424,9 +424,15 @@ muc_channel_new_tube (GabbleMucChannel *channel,
gpointer user_data)
{
GabbleMucFactory *fac = GABBLE_MUC_FACTORY (user_data);
+ GabbleMucFactoryPrivate *priv = fac->priv;
- tp_channel_manager_emit_new_channel (fac,
+ /* If the muc channel is ready announce the tubes channel right away
+ * otherwise wait for the text channel to be ready */
+ if (_gabble_muc_channel_is_ready (channel))
+ tp_channel_manager_emit_new_channel (fac,
TP_EXPORTABLE_CHANNEL (tube), NULL);
+ else
+ g_hash_table_insert (priv->text_needed_for_tubes, channel, tube);
g_signal_connect (tube, "closed",
G_CALLBACK (muc_sub_channel_closed_cb), fac);