This commit is contained in:
Debanjana Sarkar 2022-07-08 03:38:28 -07:00 committed by JC Brand
parent 17e5804be7
commit 7f99b24e28
3 changed files with 12 additions and 3 deletions

View File

@ -11,9 +11,10 @@
- Don't apply message corrections when the MUC occupant-id doesn't match.
- Update `nick` attribute on ChatRoom when user nickname changes
- Restrict editing of MUC messages to ones with the same XEP-0421 occupant ID
- #2936: Fix documentation about enable_smacks option, which is true by default.
- #2870: Fix for multiple URLs to be linkified when sent together in chat and adds a test for this.
- #2925: Fix missing disco-items in browser storage.
- Fix MUC messages with a fallback body not rendering.
- #2936: Fix documentation about enable_smacks option, which is true by default.
- #3005: Fix MUC messages with a fallback body not rendering.
## 9.1.1 (2022-05-05)

View File

@ -242,6 +242,14 @@ describe("An incoming chat Message", function () {
await mock.openChatBoxFor(_converse, contact_jid);
const view = _converse.chatboxviews.get(contact_jid);
msg_text = `> https://conversejs.org\n> https://conversejs.org`;
msg = mock.createChatMessage(_converse, contact_jid, msg_text)
await _converse.handleMessageStanza(msg);
await u.waitUntil(() => view.querySelectorAll('.chat-msg__text').length === 1);
msg_el = Array.from(view.querySelectorAll('converse-chat-message-body')).pop();
await u.waitUntil(() => msg_el.innerHTML.replace(/<!-.*?->/g, '') ===
'<blockquote><a target="_blank" rel="noopener" href="https://conversejs.org/">https://conversejs.org</a> \n <a target="_blank" rel="noopener" href="https://conversejs.org/">https://conversejs.org</a></blockquote>');
msg_text = `> This is quoted text\n>This is also quoted\nThis is not quoted`;
msg = mock.createChatMessage(_converse, contact_jid, msg_text)
await _converse.handleMessageStanza(msg);

View File

@ -145,7 +145,7 @@ export function getDirectiveTemplate (d, text, offset, options) {
const template = styling_templates[styling_map[d].name];
if (isQuoteDirective(d)) {
const newtext = text
.replace(/\n>/g, '\n') // Don't show the directive itself
.replace(/\n>/g, ' \n') // Don't show the directive itself
.replace(/\n$/, ''); // Trim line-break at the end
return template(newtext, offset, options);
} else {