[empathy] tp-chat: update self user if it has been renamed (#613930)



commit c3057afe0d6ffddc4b7223fab51751473dfb1a1f
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Fri Mar 26 11:58:50 2010 +0100

    tp-chat: update self user if it has been renamed (#613930)

 libempathy/empathy-tp-chat.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 7877acb..8358274 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -1069,6 +1069,12 @@ tp_chat_got_renamed_contacts_cb (EmpathyTpContactFactory *factory,
 		}
 	}
 
+	if (priv->user == old) {
+		/* We change our nick */
+		g_object_unref (priv->user);
+		priv->user = g_object_ref (new);
+	}
+
 	tp_chat_update_remote_contact (EMPATHY_TP_CHAT (chat));
 	tp_chat_check_if_ready (EMPATHY_TP_CHAT (chat));
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]