aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 3810e209b..c40548b19 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1644,21 +1644,16 @@ void
empathy_chat_set_tp_chat (EmpathyChat *chat,
EmpathyTpChat *tp_chat)
{
- EmpathyChatPriv *priv;
+ EmpathyChatPriv *priv = GET_PRIV (chat);
g_return_if_fail (EMPATHY_IS_CHAT (chat));
g_return_if_fail (EMPATHY_IS_TP_CHAT (tp_chat));
g_return_if_fail (empathy_tp_chat_is_ready (tp_chat));
- priv = GET_PRIV (chat);
-
- if (tp_chat == priv->tp_chat) {
+ if (priv->tp_chat) {
return;
}
- if (priv->tp_chat) {
- g_object_unref (priv->tp_chat);
- }
if (priv->account) {
g_object_unref (priv->account);
}
@@ -1699,6 +1694,9 @@ empathy_chat_set_tp_chat (EmpathyChat *chat,
}
}
+ empathy_tp_chat_set_acknowledge (priv->tp_chat, TRUE);
+ empathy_tp_chat_emit_pendings (priv->tp_chat);
+
g_object_notify (G_OBJECT (chat), "tp-chat");
g_object_notify (G_OBJECT (chat), "id");
g_object_notify (G_OBJECT (chat), "account");