Page MenuHomePhabricator

D12044.diff
No OneTemporary

D12044.diff

diff --git a/web/shared-worker/worker/worker-crypto.js b/web/shared-worker/worker/worker-crypto.js
--- a/web/shared-worker/worker/worker-crypto.js
+++ b/web/shared-worker/worker/worker-crypto.js
@@ -430,11 +430,11 @@
if (!cryptoStore) {
throw new Error('Crypto account not initialized');
}
- const { session } = cryptoStore.contentSessions[deviceID];
- if (!session) {
+ const olmSession = cryptoStore.contentSessions[deviceID];
+ if (!olmSession) {
throw new Error(`No session for deviceID: ${deviceID}`);
}
- const encryptedContent = session.encrypt(content);
+ const encryptedContent = olmSession.session.encrypt(content);
persistCryptoStore();
@@ -451,12 +451,12 @@
throw new Error('Crypto account not initialized');
}
- const { session } = cryptoStore.contentSessions[deviceID];
- if (!session) {
+ const olmSession = cryptoStore.contentSessions[deviceID];
+ if (!olmSession) {
throw new Error(`No session for deviceID: ${deviceID}`);
}
- const result = session.decrypt(
+ const result = olmSession.session.decrypt(
encryptedData.messageType,
encryptedData.message,
);
@@ -474,12 +474,12 @@
throw new Error('Crypto account not initialized');
}
- const { session } = cryptoStore.contentSessions[deviceID];
- if (!session) {
+ const olmSession = cryptoStore.contentSessions[deviceID];
+ if (!olmSession) {
throw new Error(`No session for deviceID: ${deviceID}`);
}
- const result = session.decrypt_sequential(
+ const result = olmSession.session.decrypt_sequential(
encryptedData.messageType,
encryptedData.message,
);

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 3:29 AM (21 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2427860
Default Alt Text
D12044.diff (1 KB)

Event Timeline