Explorar el Código

Bugfix. Ensure a unique cache key for MUC private messages

JC Brand hace 4 meses
padre
commit
d73852a9af
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/headless/plugins/muc/occupant.js

+ 2 - 2
src/headless/plugins/muc/occupant.js

@@ -63,8 +63,8 @@ class MUCOccupant extends ModelWithVCard(ModelWithMessages(ColorAwareModel(Model
     }
 
     getMessagesCacheKey() {
-        const id = this.get('occupant_id') ? this.get('occupant_id') : `${this.get('from')}`;
-        return `converse.messages-${id}-${_converse.session.get('bare_jid')}`;
+        const id = this.get('occupant_id') || this.get('jid') || this.get('nick');
+        return `converse.muc-private-msgs-${id}-${_converse.session.get('bare_jid')}`;
     }
 
     getMessagesCollection() {