Bladeren bron

fix #1937 - Editing a message removes the mentions highlight (#1938)

* Fixes #1937 Editing a message removes the mentions highlight
Dele Olajide 5 jaren geleden
bovenliggende
commit
10da630d8a
2 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 1 0
      CHANGES.md
  2. 2 2
      src/converse-chatview.js

+ 1 - 0
CHANGES.md

@@ -26,6 +26,7 @@ Soon we'll deprecate the latter, so prepare now.
 - Start using [lit-html](https://lit-html.polymer-project.org/) instead of lodash for templating.
 - [muc_fetch_members](https://conversejs.org/docs/html/configuration.html#muc-fetch-members) now also accepts an array of affiliations to fetch.
 - Remove the configuration setting `muc_show_join_leave_status`. The optional status message is no longer shown at all.
+- #1937: Editing a message removes the mentions highlight
 
 ## 6.0.0 (2020-01-09)
 

+ 2 - 2
src/converse-chatview.js

@@ -1045,7 +1045,7 @@ converse.plugins.add('converse-chatview', {
                     }
                 }
                 if (message) {
-                    this.insertIntoTextArea(message.get('message'), true, true);
+                    this.insertIntoTextArea(u.prefixMentions(message), true, true);
                     message.save('correcting', true);
                 } else {
                     this.insertIntoTextArea('', true, false);
@@ -1068,7 +1068,7 @@ converse.plugins.add('converse-chatview', {
                 }
                 message = message || this.getOwnMessages().reverse().find(m => m.get('editable'));
                 if (message) {
-                    this.insertIntoTextArea(message.get('message'), true, true);
+                    this.insertIntoTextArea(u.prefixMentions(message), true, true);
                     message.save('correcting', true);
                 }
             },