Commit 1b9ba58a authored by JC Brand's avatar JC Brand

Rename variable to be more accurate

parent 99f539b3
......@@ -1174,7 +1174,8 @@
expect(u.hasClass('chat-msg--followup', chat_content.querySelector('.message:nth-child(4)'))).toBe(true);
expect(chat_content.querySelector('.message:nth-child(4) .chat-msg__text').textContent).toBe(
"A delayed message, sent 5 minutes since we started");
expect(u.hasClass('chat-msg--followup', chat_content.querySelector('.message:nth-child(5)'))).toBe(true);
expect(u.hasClass('chat-msg--followup', chat_content.querySelector('.message:nth-child(5)'))).toBe(false);
expect(chat_content.querySelector('.message:nth-child(5) .chat-msg__text').textContent).toBe(
"Another message 14 minutes since we started");
expect(u.hasClass('chat-msg--followup', chat_content.querySelector('.message:nth-child(6)'))).toBe(true);
......@@ -1207,7 +1208,7 @@
expect(u.hasClass('chat-msg--followup', chat_content.querySelector('.message:nth-child(5)'))).toBe(false);
expect(chat_content.querySelector('.message:nth-child(5) .chat-msg__text').textContent).toBe(
"A delayed message, sent 5 minutes since we started");
expect(u.hasClass('chat-msg--followup', chat_content.querySelector('.message:nth-child(6)'))).toBe(true);
expect(u.hasClass('chat-msg--followup', chat_content.querySelector('.message:nth-child(6)'))).toBe(false);
expect(chat_content.querySelector('.message:nth-child(6) .chat-msg__text').textContent).toBe(
"Another message 14 minutes since we started");
expect(u.hasClass('chat-msg--followup', chat_content.querySelector('.message:nth-child(7)'))).toBe(true);
......
......@@ -849,7 +849,7 @@ converse.plugins.add('converse-chat', {
'origin_id': origin_id,
'fullname': _converse.xmppstatus.get('fullname'),
'from': _converse.bare_jid,
'is_single_emoji': text ? u.isOnlyEmojis(text) : false,
'is_only_emojis': text ? u.isOnlyEmojis(text) : false,
'sender': 'me',
'time': (new Date()).toISOString(),
'message': text ? u.httpToGeoUri(u.shortnameToUnicode(text), _converse) : undefined,
......@@ -912,7 +912,7 @@ converse.plugins.add('converse-chat', {
'message': attrs.message,
'older_versions': older_versions,
'references': attrs.references,
'is_single_emoji': attrs.message ? u.isOnlyEmojis(attrs.message) : false,
'is_only_emojis': attrs.is_only_emojis,
'origin_id': u.getUniqueId(),
'received': undefined
});
......
......@@ -793,7 +793,7 @@ converse.plugins.add('converse-muc', {
'origin_id': origin_id,
'from': `${this.get('jid')}/${this.get('nick')}`,
'fullname': this.get('nick'),
'is_single_emoji': text ? u.isOnlyEmojis(text) : false,
'is_only_emojis': text ? u.isOnlyEmojis(text) : false,
'is_spoiler': is_spoiler,
'message': text ? u.httpToGeoUri(u.shortnameToUnicode(text), _converse) : undefined,
'nick': this.get('nick'),
......
......@@ -294,7 +294,7 @@ const stanza_utils = {
'chat_state': stanza_utils.getChatState(stanza),
'is_archived': stanza_utils.isArchived(original_stanza),
'is_delayed': !!delay,
'is_single_emoji': text ? await u.isOnlyEmojis(text) : false,
'is_only_emojis': text ? await u.isOnlyEmojis(text) : false,
'message': text,
'msgid': stanza.getAttribute('id') || original_stanza.getAttribute('id'),
'references': stanza_utils.getReferences(stanza),
......
......@@ -30,7 +30,7 @@
<div class="chat-msg__subject">{{{ o.subject }}}</div>
{[ } ]}
<div class="chat-msg__text
{[ if (o.is_single_emoji) { ]} chat-msg__text--larger{[ } ]}
{[ if (o.is_only_emojis) { ]} chat-msg__text--larger{[ } ]}
{[ if (o.is_spoiler) { ]} spoiler collapsed{[ } ]}"><!-- message gets added here via renderMessage --></div>
<div class="chat-msg__media"></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