]> git.0d.be Git - empathy.git/commitdiff
tp_chat_check_if_ready: split the test checking if the TpChat is ready
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 11 Nov 2009 11:58:55 +0000 (11:58 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 13 Nov 2009 15:59:22 +0000 (15:59 +0000)
libempathy/empathy-tp-chat.c

index 83faaff3921e84898688f68465f81850030d6a73..79136156a68e3d49c4fe4ca10435cb59c1c4ad0f 100644 (file)
@@ -777,10 +777,15 @@ tp_chat_check_if_ready (EmpathyTpChat *chat)
 {
        EmpathyTpChatPriv *priv = GET_PRIV (chat);
 
-       if (priv->ready || priv->user == NULL ||
-           (priv->members == NULL && priv->remote_contact == NULL)) {
+       if (priv->ready)
+               return;
+
+       if (priv->user == NULL)
+               return;
+
+       /* We need either the members (room) or the remote contact (private chat) */
+       if (priv->members == NULL && priv->remote_contact == NULL)
                return;
-       }
 
        DEBUG ("Ready!");