Bug 955580 - Don't include ib-sender span in magic copy, r=florian.
authoraleth <aleth@instantbird.org>
Fri, 06 Sep 2013 02:07:40 +0200
changeset 19146 400ac71b45653055f34a90c4ea891989badeae21
parent 19145 e2ceb3e9995cb8a751979025995a7048fc0bc785
child 19147 a91e5387352474ca99fb8d02b5292846c640b1fd
push id1103
push usermbanner@mozilla.com
push dateTue, 18 Mar 2014 07:44:06 +0000
treeherdercomm-beta@50c6279a0af0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs955580
Bug 955580 - Don't include ib-sender span in magic copy, r=florian.
chat/modules/imThemes.jsm
--- a/chat/modules/imThemes.jsm
+++ b/chat/modules/imThemes.jsm
@@ -904,23 +904,23 @@ SelectedMessage.prototype = {
                                            "%time% * %sender% %message%");
       }
       else {
         html = getLocalizedPrefWithDefault("contentMessagesTemplate",
                                            "%time% - %sender%: %message%");
       }
     }
 
-    // override the default %message% replacement so that it doesn't
-    // add a span node.
+    // Overrides default replacements so that they don't add a span node.
     // Also, this uses directly the text variable so that we don't
     // have to change the content of msg.message and revert it
     // afterwards.
     replacements = {
       message: function(aMsg) text,
+      sender: function(aMsg) aMsg.alias || aMsg.who,
       __proto__: replacements
     };
 
     // Finally, let the theme system do the magic!
     return replaceKeywordsInHTML(html, replacements, msg);
   }
 };