|
@@ -56280,7 +56280,7 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
|
|
const _converse = this.__super__._converse,
|
|
const _converse = this.__super__._converse,
|
|
session_cipher = this.getSessionCipher(attrs.from, parseInt(attrs.encrypted.device_id, 10)); // https://xmpp.org/extensions/xep-0384.html#usecases-receiving
|
|
session_cipher = this.getSessionCipher(attrs.from, parseInt(attrs.encrypted.device_id, 10)); // https://xmpp.org/extensions/xep-0384.html#usecases-receiving
|
|
|
|
|
|
- if (attrs.encrypted.prekey === 'true') {
|
|
|
|
|
|
+ if (attrs.encrypted.prekey === true) {
|
|
let plaintext;
|
|
let plaintext;
|
|
return session_cipher.decryptPreKeyWhisperMessage(u.base64ToArrayBuffer(attrs.encrypted.key), 'binary').then(key_and_tag => {
|
|
return session_cipher.decryptPreKeyWhisperMessage(u.base64ToArrayBuffer(attrs.encrypted.key), 'binary').then(key_and_tag => {
|
|
if (attrs.encrypted.payload) {
|
|
if (attrs.encrypted.payload) {
|
|
@@ -56340,7 +56340,7 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
|
|
'iv': header.querySelector('iv').textContent,
|
|
'iv': header.querySelector('iv').textContent,
|
|
'key': key.textContent,
|
|
'key': key.textContent,
|
|
'payload': _.get(encrypted.querySelector('payload'), 'textContent', null),
|
|
'payload': _.get(encrypted.querySelector('payload'), 'textContent', null),
|
|
- 'prekey': key.getAttribute('prekey')
|
|
|
|
|
|
+ 'prekey': _.includes(['true', '1'], key.getAttribute('prekey'))
|
|
};
|
|
};
|
|
return this.decrypt(attrs);
|
|
return this.decrypt(attrs);
|
|
} else {
|
|
} else {
|