aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-11 20:15:51 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-13 23:59:22 +0800
commita6a3c811cbd2bdd64f6d49702bf1ad2f2fdf027c (patch)
treefda3f6c9df5db7c415c5702ee902deda15cf7281 /libempathy
parentdd2c190bbbdbeec07e3923eb9d99af7d0e84b055 (diff)
downloadgsoc2013-empathy-a6a3c811cbd2bdd64f6d49702bf1ad2f2fdf027c.tar
gsoc2013-empathy-a6a3c811cbd2bdd64f6d49702bf1ad2f2fdf027c.tar.gz
gsoc2013-empathy-a6a3c811cbd2bdd64f6d49702bf1ad2f2fdf027c.tar.bz2
gsoc2013-empathy-a6a3c811cbd2bdd64f6d49702bf1ad2f2fdf027c.tar.lz
gsoc2013-empathy-a6a3c811cbd2bdd64f6d49702bf1ad2f2fdf027c.tar.xz
gsoc2013-empathy-a6a3c811cbd2bdd64f6d49702bf1ad2f2fdf027c.tar.zst
gsoc2013-empathy-a6a3c811cbd2bdd64f6d49702bf1ad2f2fdf027c.zip
tp_chat_check_if_ready: deal with password protected room
The TpChat is not ready if we are fetching the password flags. But once it's fetched, the chat is ready if it's protected as we won't be able to get the members of the room.
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-chat.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 73c446a7d..aea125469 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -787,8 +787,14 @@ tp_chat_check_if_ready (EmpathyTpChat *chat)
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)
+ if (!priv->got_password_flags)
+ return;
+
+ /* We need either the members (room) or the remote contact (private chat).
+ * If the chat is protected by a password we can't get these information so
+ * consider the chat as ready so it can be presented to the user. */
+ if (!empathy_tp_chat_password_needed (chat) && priv->members == NULL &&
+ priv->remote_contact == NULL)
return;
DEBUG ("Ready!");
@@ -1051,6 +1057,8 @@ got_password_flags_cb (TpChannel *proxy,
priv->got_password_flags = TRUE;
priv->password_flags = password_flags;
+
+ tp_chat_check_if_ready (EMPATHY_TP_CHAT (self));
}
static GObject *