Page MenuHomePhabricator

D10368.diff
No OneTemporary

D10368.diff

diff --git a/lib/shared/crypto-utils.js b/lib/shared/crypto-utils.js
--- a/lib/shared/crypto-utils.js
+++ b/lib/shared/crypto-utils.js
@@ -20,7 +20,7 @@
CallServerEndpointOptions,
CallServerEndpoint,
} from '../utils/call-server-endpoint.js';
-import { values } from '../utils/objects.js';
+import { values, entries } from '../utils/objects.js';
export type InitialNotifMessageOptions = {
+callServerEndpoint?: ?CallServerEndpoint,
@@ -98,6 +98,14 @@
return getPrekeyValue(prekey);
}
+function getOneTimeKeyArray(
+ oneTimeKeys: OLMOneTimeKeys,
+): $ReadOnlyArray<string> {
+ return entries(oneTimeKeys.curve25519).map(([key, value]: [string, string]) =>
+ JSON.stringify({ curve25519: { [key]: value } }),
+ );
+}
+
export {
getOneTimeKeyValues,
getPrekeyValue,
@@ -105,4 +113,5 @@
getPrekeyValueFromBlob,
initialEncryptedMessageContent,
useInitialNotificationsEncryptedMessage,
+ getOneTimeKeyArray,
};

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 4:12 AM (7 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2703798
Default Alt Text
D10368.diff (949 B)

Event Timeline