]> git.0d.be Git - empathy.git/commitdiff
adium: set x-empathy-message-id class in messageStyles
authorJonny Lamb <jonnylamb@gnome.org>
Fri, 13 May 2011 10:22:22 +0000 (11:22 +0100)
committerJonny Lamb <jonnylamb@gnome.org>
Fri, 13 May 2011 10:22:22 +0000 (11:22 +0100)
Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
libempathy-gtk/empathy-theme-adium.c

index 06410c528a8c3a28c65cf20d76c8383dc9abd39f..c947c28974b45ee324dc3b64cb64c1c74c730d5f 100644 (file)
@@ -638,6 +638,7 @@ theme_adium_append_message (EmpathyChatView *view,
        EmpathyThemeAdium     *theme = EMPATHY_THEME_ADIUM (view);
        EmpathyThemeAdiumPriv *priv = GET_PRIV (theme);
        EmpathyContact        *sender;
+       TpMessage             *tp_msg;
        TpAccount             *account;
        gchar                 *body_escaped;
        const gchar           *body;
@@ -759,6 +760,16 @@ theme_adium_append_message (EmpathyChatView *view,
         * %status% - See %status% in theme_adium_append_html ()
         */
 
+       /* x-empathy-message-id-* */
+       tp_msg = empathy_message_get_tp_message (msg);
+       if (tp_msg != NULL) {
+               gchar *tmp = tp_escape_as_identifier (
+                   tp_message_get_token (tp_msg));
+               g_string_append_printf (message_classes,
+                   " x-empathy-message-id-%s", tmp);
+               g_free (tmp);
+       }
+
        /* Define javascript function to use */
        if (consecutive) {
                func = priv->allow_scrolling ? "appendNextMessage" : "appendNextMessageNoScroll";