Bladeren bron

Always create a new session

JC Brand 6 jaren geleden
bovenliggende
commit
c2184ce8e1
2 gewijzigde bestanden met toevoegingen van 6 en 11 verwijderingen
  1. 3 6
      dist/converse.js
  2. 3 5
      src/converse-omemo.js

+ 3 - 6
dist/converse.js

@@ -71908,12 +71908,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
         },
         },
 
 
         getSessionCipher(jid, id) {
         getSessionCipher(jid, id) {
-          if (!this.session_cipher) {
-            const _converse = this.__super__._converse,
-                  address = new libsignal.SignalProtocolAddress(jid, id);
-            this.session_cipher = new window.libsignal.SessionCipher(_converse.omemo_store, address);
-          }
-
+          const _converse = this.__super__._converse,
+                address = new libsignal.SignalProtocolAddress(jid, id);
+          this.session_cipher = new window.libsignal.SessionCipher(_converse.omemo_store, address);
           return this.session_cipher;
           return this.session_cipher;
         },
         },
 
 

+ 3 - 5
src/converse-omemo.js

@@ -332,11 +332,9 @@
                 },
                 },
 
 
                 getSessionCipher (jid, id) {
                 getSessionCipher (jid, id) {
-                    if (!this.session_cipher) {
-                        const { _converse } = this.__super__,
-                              address = new libsignal.SignalProtocolAddress(jid, id);
-                        this.session_cipher = new window.libsignal.SessionCipher(_converse.omemo_store, address);
-                    }
+                    const { _converse } = this.__super__,
+                            address = new libsignal.SignalProtocolAddress(jid, id);
+                    this.session_cipher = new window.libsignal.SessionCipher(_converse.omemo_store, address);
                     return this.session_cipher;
                     return this.session_cipher;
                 },
                 },