aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorOlivier Le Thanh Duong <olivier@lethanh.be>2009-09-21 00:42:20 +0800
committerOlivier Le Thanh Duong <olivier@lethanh.be>2009-09-21 00:42:20 +0800
commit1ca52da13f25b623adb55127aee61c6ea2f68bea (patch)
treeb6f199ca0e88308eacdb220bbb0a21c84c52e377 /libempathy-gtk
parent92d9677c07a4591869cab86b27e21676221cf614 (diff)
downloadgsoc2013-empathy-1ca52da13f25b623adb55127aee61c6ea2f68bea.tar
gsoc2013-empathy-1ca52da13f25b623adb55127aee61c6ea2f68bea.tar.gz
gsoc2013-empathy-1ca52da13f25b623adb55127aee61c6ea2f68bea.tar.bz2
gsoc2013-empathy-1ca52da13f25b623adb55127aee61c6ea2f68bea.tar.lz
gsoc2013-empathy-1ca52da13f25b623adb55127aee61c6ea2f68bea.tar.xz
gsoc2013-empathy-1ca52da13f25b623adb55127aee61c6ea2f68bea.tar.zst
gsoc2013-empathy-1ca52da13f25b623adb55127aee61c6ea2f68bea.zip
Fallback to the contact id if present when there is no room id for empathy_tp_chat
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index c08b49c3f..ea6b40ef6 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1325,20 +1325,19 @@ chat_remote_contact_changed_cb (EmpathyChat *chat)
priv->remote_contact = NULL;
}
+ g_free (priv->id);
+
+ priv->id = g_strdup (empathy_tp_chat_get_id (priv->tp_chat));
priv->remote_contact = empathy_tp_chat_get_remote_contact (priv->tp_chat);
if (priv->remote_contact != NULL) {
g_object_ref (priv->remote_contact);
priv->handle_type = TP_HANDLE_TYPE_CONTACT;
- g_free (priv->id);
- priv->id = g_strdup (empathy_contact_get_id (priv->remote_contact));
}
else if (priv->tp_chat != NULL) {
TpChannel *channel;
channel = empathy_tp_chat_get_channel (priv->tp_chat);
g_object_get (channel, "handle-type", &priv->handle_type, NULL);
- g_free (priv->id);
- priv->id = g_strdup (empathy_tp_chat_get_id (priv->tp_chat));
}
chat_update_contacts_visibility (chat);