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
Sun, Nov 24, 12:43 AM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2573297
Default Alt Text
D10368.diff (949 B)

Event Timeline