]> git.0d.be Git - empathy.git/commitdiff
Don't highlight scrollback messages (#602288)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 2 Dec 2009 12:42:50 +0000 (12:42 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 2 Dec 2009 12:42:50 +0000 (12:42 +0000)
libempathy/empathy-message.c

index bab286585cd2445e27f1191986b4ca518a18c172..0fe45788660ee53f2781c7976dc9800604b89f10 100644 (file)
@@ -445,6 +445,7 @@ empathy_message_should_highlight (EmpathyMessage *message)
        gchar         *cf_msg, *cf_to;
        gchar         *ch;
        gboolean       ret_val;
+       TpChannelTextMessageFlags flags;
 
        g_return_val_if_fail (EMPATHY_IS_MESSAGE (message), FALSE);
 
@@ -465,6 +466,13 @@ empathy_message_should_highlight (EmpathyMessage *message)
                return FALSE;
        }
 
+       flags = empathy_message_get_flags (message);
+       if (flags & TP_CHANNEL_TEXT_MESSAGE_FLAG_SCROLLBACK) {
+               /* FIXME: Ideally we shouldn't highlight scrollback messages only if they
+                * have already been received by the user before (and so are in the logs) */
+               return FALSE;
+       }
+
        cf_msg = g_utf8_casefold (msg, -1);
        cf_to = g_utf8_casefold (to, -1);