[Telepathy-commits] [telepathy-gabble/master] Loosen assumptions in muc-factory about what channels will be ready when

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:47 PDT 2008


20080721180105-53eee-a1221611b8a2e33efc0496ff1fb708172d06c4d8.gz
---
 src/muc-factory.c |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/src/muc-factory.c b/src/muc-factory.c
index 7791c33..06fdc80 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -372,20 +372,10 @@ new_muc_channel (GabbleMucFactory *fac,
 
   g_free (object_path);
 
-  if (invite_self)
-    {
-      g_assert (!_gabble_muc_channel_is_ready (chan));
-
-      g_signal_connect (chan, "ready", G_CALLBACK (muc_ready_cb), fac);
-    }
+  if (_gabble_muc_channel_is_ready (chan))
+    muc_ready_cb (chan, fac);
   else
-    {
-      /* if we've been invited by someone else, then it's considered to be
-       * ready immediately - but we're too late to get the signal since
-       * g_object_new emitted it */
-      g_assert (_gabble_muc_channel_is_ready (chan));
-      muc_ready_cb (chan, fac);
-    }
+    g_signal_connect (chan, "ready", G_CALLBACK (muc_ready_cb), fac);
 
   g_signal_connect (chan, "join-error", G_CALLBACK (muc_join_error_cb),
                     fac);
-- 
1.5.6.3




More information about the Telepathy-commits mailing list