Page MenuHomePhabricator

D12044.id40204.diff
No OneTemporary

D12044.id40204.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
Sat, Nov 23, 2:54 PM (17 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2569909
Default Alt Text
D12044.id40204.diff (1 KB)

Event Timeline