From: Guillaume Desmottes Date: Wed, 11 Nov 2009 11:58:55 +0000 (+0000) Subject: tp_chat_check_if_ready: split the test checking if the TpChat is ready X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=07e4c25c4a39705b7b6ecaaac6c8e001d611a713 tp_chat_check_if_ready: split the test checking if the TpChat is ready --- diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 83faaff3..79136156 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -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!");