[empathy] Fix urgency hint for MUCs



commit 7c1c77662edf9ef232bb7648fa6c516d31de3648
Author: Xavier Claessens <xclaesse gmail com>
Date:   Fri Apr 17 14:50:06 2009 +0200

    Fix urgency hint for MUCs
---
 src/empathy-chat-window.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index e682334..145d45e 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -954,7 +954,13 @@ chat_window_new_message_cb (EmpathyChat       *chat,
 		return;
 	}
 	
-	if (empathy_chat_get_members_count (chat) > 2) {
+	/* If empathy_chat_is_room() returns TRUE, that means it's a named MUC.
+	 * If empathy_chat_get_remote_contact() returns NULL, that means it's
+	 * an unamed MUC (msn-like).
+	 * In case of a MUC, we set urgency only if the message contains our
+	 * alias. */
+	if (empathy_chat_is_room (chat) ||
+	    empathy_chat_get_remote_contact (chat) == NULL) {
 		needs_urgency = empathy_message_should_highlight (message);
 	} else {
 		needs_urgency = TRUE;



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