Support nameless chat messages

These messages are used to support timestamps and highlighting in
certain places.
This commit is contained in:
Guangcong Luo
2015-08-28 21:43:02 -04:00
parent d739ee0a20
commit ace15e882a

View File

@@ -415,6 +415,9 @@ var Tools = {
return '<div class="chat">' + Tools.sanitizeHTML(target) + '</div>';
default:
// Not a command or unsupported. Parsed as a normal chat message.
if (!name) {
return '<div class="chat' + hlClass + '">' + timestamp + '<em>' + Tools.parseMessage(message) + '</em></div>';
}
return '<div class="chat chatmessage-' + toId(name) + hlClass + mineClass + '">' + timestamp + '<strong style="' + color + '">' + clickableName + ':</strong> <em>' + Tools.parseMessage(message) + '</em></div>';
}
},