Browse Source

Make sure messages are marked as followups after re-render

JC Brand 6 years ago
parent
commit
09c3d30ccc
2 changed files with 9 additions and 2 deletions
  1. 5 1
      dist/converse.js
  2. 4 1
      src/converse-message-view.js

+ 5 - 1
dist/converse.js

@@ -67223,7 +67223,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
         },
 
         async render() {
-          let msg;
+          const is_followup = u.hasClass('chat-msg--followup', this.el);
 
           if (this.model.isOnlyChatStateNotification()) {
             this.renderChatStateNotification();
@@ -67235,6 +67235,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
             await this.renderChatMessage();
           }
 
+          if (is_followup) {
+            u.addClass('chat-msg--followup', this.el);
+          }
+
           return this.el;
         },
 

+ 4 - 1
src/converse-message-view.js

@@ -69,7 +69,7 @@
                 },
 
                 async render () {
-                    let msg;
+                    const is_followup = u.hasClass('chat-msg--followup', this.el);
                     if (this.model.isOnlyChatStateNotification()) {
                         this.renderChatStateNotification()
                     } else if (this.model.get('file') && !this.model.get('oob_url')) {
@@ -79,6 +79,9 @@
                     } else {
                         await this.renderChatMessage();
                     }
+                    if (is_followup) {
+                        u.addClass('chat-msg--followup', this.el);
+                    }
                     return this.el;
                 },