Explorar el Código

muc: One more place to fetch messages

When restoring an already entered room from cache.
Otherwise we end up with an empty history.
JC Brand hace 5 años
padre
commit
d2cf29bce4
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/headless/converse-muc.js

+ 2 - 1
src/headless/converse-muc.js

@@ -416,7 +416,8 @@ converse.plugins.add('converse-muc', {
                     this.join();
                 } else if (!(await this.rejoinIfNecessary())) {
                     // We've restored the room from cache and we're still joined.
-                    this.features.fetch();
+                    await new Promise(resolve => this.features.fetch({'success': resolve, 'error': resolve}));
+                    await this.fetchMessages();
                 }
             },