Commit 2c88545b authored by JC Brand's avatar JC Brand

Fix edge case with /me messages. Show in italics.

parent 9c722057
......@@ -1564,6 +1564,9 @@
#conversejs .chatbox .chat-body .chat-image {
max-width: 100%;
max-height: 100%; }
#converse-embedded-chat .chatbox .chat-body .chat-action,
#conversejs .chatbox .chat-body .chat-action {
font-style: italic; }
#converse-embedded-chat .chatbox .chat-body .chat-message,
#conversejs .chatbox .chat-body .chat-message {
margin: 0.3em; }
......
......@@ -163,6 +163,9 @@
max-width: 100%;
max-height: 100%;
}
.chat-action {
font-style: italic;
}
.chat-message {
margin: 0.3em;
span {
......
......@@ -325,7 +325,7 @@
text = text.replace(/^\/me/, '');
template = tpl_action;
if (attrs.sender === 'me') {
fullname = _converse.xmppstatus.get('fullname');
fullname = _converse.xmppstatus.get('fullname') || attrs.fullname;
username = _.isNil(fullname)? _converse.bare_jid: fullname;
} else {
username = attrs.fullname;
......
<div class="chat-message {{{extra_classes}}}" data-isodate="{{{isodate}}}">
<span class="chat-msg-author chat-msg-{{{sender}}}">{{{time}}} **{{{username}}}&nbsp;</span>
<span class="chat-msg-content"><!-- message gets added here via renderMessage --></span>
<span class="chat-msg-content chat-action"><!-- message gets added here via renderMessage --></span>
</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment