Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3568255
D13171.id43909.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D13171.id43909.diff
View Options
diff --git a/lib/tunnelbroker/peer-to-peer-context.js b/lib/tunnelbroker/peer-to-peer-context.js
--- a/lib/tunnelbroker/peer-to-peer-context.js
+++ b/lib/tunnelbroker/peer-to-peer-context.js
@@ -146,7 +146,7 @@
};
await sendMessageToPeer(encryptedMessage);
} catch (e) {
- if (!e.message?.includes(olmSessionErrors.sessionDoesNotExists)) {
+ if (!e.message?.includes(olmSessionErrors.sessionDoesNotExist)) {
console.log(`Error sending messages to peer ${peerDeviceID}`, e);
break;
}
@@ -325,7 +325,7 @@
payload: JSON.stringify(encryptedMessage),
});
} catch (e) {
- if (!e.message?.includes(olmSessionErrors.sessionDoesNotExists)) {
+ if (!e.message?.includes(olmSessionErrors.sessionDoesNotExist)) {
console.log(
`Error sending messages to peer ${recipient.deviceID}`,
e,
diff --git a/lib/utils/olm-utils.js b/lib/utils/olm-utils.js
--- a/lib/utils/olm-utils.js
+++ b/lib/utils/olm-utils.js
@@ -129,7 +129,7 @@
// This definition should remain in sync with the value defined in
// the corresponding .cpp file
// at `native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp`.
- sessionDoesNotExists: 'SESSION_DOES_NOT_EXISTS',
+ sessionDoesNotExist: 'SESSION_DOES_NOT_EXIST',
// Error thrown when attempting to decrypt a message encrypted
// with an already replaced old session.
// This definition should remain in sync with the value defined in
diff --git a/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp b/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp
--- a/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp
+++ b/native/cpp/CommonCpp/CryptoTools/CryptoModule.cpp
@@ -14,7 +14,7 @@
// This definition should remain in sync with the value defined in
// the corresponding JavaScript file at `lib/utils/olm-utils.js`.
-const std::string SESSION_DOES_NOT_EXISTS_ERROR{"SESSION_DOES_NOT_EXISTS"};
+const std::string SESSION_DOES_NOT_EXIST_ERROR{"SESSION_DOES_NOT_EXIST"};
const std::string INVALID_SESSION_VERSION_ERROR{"INVALID_SESSION_VERSION"};
CryptoModule::CryptoModule(std::string id) : id{id} {
@@ -386,7 +386,7 @@
const std::string &targetDeviceId,
const std::string &content) {
if (!this->hasSessionFor(targetDeviceId)) {
- throw std::runtime_error{SESSION_DOES_NOT_EXISTS_ERROR};
+ throw std::runtime_error{SESSION_DOES_NOT_EXIST_ERROR};
}
return this->sessions.at(targetDeviceId)->encrypt(content);
}
@@ -395,7 +395,7 @@
const std::string &targetDeviceId,
EncryptedData &encryptedData) {
if (!this->hasSessionFor(targetDeviceId)) {
- throw std::runtime_error{SESSION_DOES_NOT_EXISTS_ERROR};
+ throw std::runtime_error{SESSION_DOES_NOT_EXIST_ERROR};
}
auto session = this->sessions.at(targetDeviceId);
if (encryptedData.sessionVersion.has_value() &&
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
@@ -555,7 +555,7 @@
}
const olmSession = cryptoStore.contentSessions[deviceID];
if (!olmSession) {
- throw new Error(olmSessionErrors.sessionDoesNotExists);
+ throw new Error(olmSessionErrors.sessionDoesNotExist);
}
const encryptedContent = olmSession.session.encrypt(content);
@@ -577,7 +577,7 @@
}
const olmSession = cryptoStore.contentSessions[deviceID];
if (!olmSession) {
- throw new Error(olmSessionErrors.sessionDoesNotExists);
+ throw new Error(olmSessionErrors.sessionDoesNotExist);
}
const encryptedContent = olmSession.session.encrypt(content);
@@ -632,7 +632,7 @@
const olmSession = cryptoStore.contentSessions[deviceID];
if (!olmSession) {
- throw new Error(olmSessionErrors.sessionDoesNotExists);
+ throw new Error(olmSessionErrors.sessionDoesNotExist);
}
if (
@@ -663,7 +663,7 @@
const olmSession = cryptoStore.contentSessions[deviceID];
if (!olmSession) {
- throw new Error(olmSessionErrors.sessionDoesNotExists);
+ throw new Error(olmSessionErrors.sessionDoesNotExist);
}
if (
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 10:17 PM (8 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2724292
Default Alt Text
D13171.id43909.diff (4 KB)
Attached To
Mode
D13171: [lib][web][native] rename `SESSION_DOES_NOT_EXISTS` -> `SESSION_DOES_NOT_EXIST`
Attached
Detach File
Event Timeline
Log In to Comment