Bug 920801 - Port chat/ changes from Instantbird to comm-central - 6 - Bio 1950 - Completing "/me" shows the list of suggestions as action inside a system message, r=Mic.
authoraleth <aleth@instantbird.org>
Tue, 21 May 2013 21:44:46 +0200
changeset 17164 c55b40e46558cedb15e1c0e698af65c6f7243a7a
parent 17163 06cdc5f8ea077be6eec98003f0671f09c6b2aad7
child 17165 7ff40d7a00a1826b643b3d0b5991ec26e37620e7
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)
reviewersMic
bugs920801
Bug 920801 - Port chat/ changes from Instantbird to comm-central - 6 - Bio 1950 - Completing "/me" shows the list of suggestions as action inside a system message, r=Mic.
chat/modules/imThemes.jsm
--- a/chat/modules/imThemes.jsm
+++ b/chat/modules/imThemes.jsm
@@ -354,32 +354,33 @@ const statusMessageReplacements = {
     if (aFormat)
       return date.toLocaleFormat(aFormat);
     return date.toLocaleTimeString();
   },
   timestamp: function(aMsg) aMsg.time,
   shortTime: function(aMsg) (new Date(aMsg.time * 1000)).toLocaleTimeString(),
   messageClasses: function(aMsg) {
     let msgClass = [];
-    if (/^(<[^>]+>)*\/me /.test(aMsg.originalMessage))
-      msgClass.push("action");
 
-    if (!aMsg.system) {
+    if (aMsg.system)
+      msgClass.push("event");
+    else {
       msgClass.push("message");
+
       if (aMsg.incoming)
         msgClass.push("incoming");
-      else
-        if (aMsg.outgoing)
-          msgClass.push("outgoing");
+      else if (aMsg.outgoing)
+        msgClass.push("outgoing");
+
+      if (/^(<[^>]+>)*\/me /.test(aMsg.originalMessage))
+        msgClass.push("action");
 
       if (aMsg.autoResponse)
         msgClass.push("autoreply");
     }
-    else
-      msgClass.push("event");
 
     if (aMsg.containsNick)
       msgClass.push("nick");
     if (aMsg.error)
       msgClass.push("error");
     if (aMsg.delayed)
       msgClass.push("delayed");
     if (aMsg.notification)