Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3533505
D10594.id35495.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10594.id35495.diff
View Options
diff --git a/native/handlers/peer-to-peer-message-handler.js b/native/handlers/peer-to-peer-message-handler.js
--- a/native/handlers/peer-to-peer-message-handler.js
+++ b/native/handlers/peer-to-peer-message-handler.js
@@ -27,6 +27,7 @@
}
} else if (message.type === peerToPeerMessageTypes.ENCRYPTED_MESSAGE) {
try {
+ await commCoreModule.initializeCryptoAccount();
const decrypted = await commCoreModule.decrypt(
message.encryptedContent,
message.senderInfo.deviceID,
@@ -42,6 +43,7 @@
);
}
} else if (message.type === peerToPeerMessageTypes.REFRESH_KEY_REQUEST) {
+ await commCoreModule.initializeCryptoAccount();
const [
{ userID, deviceID, accessToken },
notificationsOneTimeKeys,
diff --git a/native/profile/tunnelbroker-menu.react.js b/native/profile/tunnelbroker-menu.react.js
--- a/native/profile/tunnelbroker-menu.react.js
+++ b/native/profile/tunnelbroker-menu.react.js
@@ -73,6 +73,7 @@
if (!currentUserID) {
return;
}
+ await commCoreModule.initializeCryptoAccount();
const encrypted = await commCoreModule.encrypt(
`Encrypted message to ${recipient}`,
recipient,
diff --git a/native/utils/crypto-utils.js b/native/utils/crypto-utils.js
--- a/native/utils/crypto-utils.js
+++ b/native/utils/crypto-utils.js
@@ -50,6 +50,7 @@
throw new Error('CommServicesAuthMetadata is missing');
}
+ await commCoreModule.initializeCryptoAccount();
const keysResponse = await commRustModule.getInboundKeysForUser(
userID,
deviceID,
@@ -112,6 +113,7 @@
throw new Error('CommServicesAuthMetadata is missing');
}
+ await commCoreModule.initializeCryptoAccount();
const keysResponse = await commRustModule.getOutboundKeysForUser(
userID,
deviceID,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 11:39 AM (12 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2705824
Default Alt Text
D10594.id35495.diff (1 KB)
Attached To
Mode
D10594: [native] initialize crypto account before any crypto-related operation
Attached
Detach File
Event Timeline
Log In to Comment