Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3273685
D9450.id32032.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
D9450.id32032.diff
View Options
diff --git a/keyserver/src/responders/keys-responders.js b/keyserver/src/responders/keys-responders.js
--- a/keyserver/src/responders/keys-responders.js
+++ b/keyserver/src/responders/keys-responders.js
@@ -20,7 +20,7 @@
import type { Viewer } from '../session/viewer.js';
import { fetchCallUpdateOlmAccount } from '../updaters/olm-account-updater.js';
-type AccountKeysSet = {
+type SessionInitializationKeysSet = {
+identityKeys: string,
...OlmSessionInitializationInfo,
};
@@ -44,16 +44,16 @@
return await fetchSessionPublicKeys(request.session);
}
-async function retrieveAccountKeysSet(
+function retrieveSessionInitializationKeysSet(
account: OlmAccount,
-): Promise<AccountKeysSet> {
+): SessionInitializationKeysSet {
const identityKeys = account.identity_keys();
const prekey = account.prekey();
const prekeySignature = account.prekey_signature();
if (!prekeySignature) {
- throw new ServerError('prekey_validation_failure');
+ throw new ServerError('invalid_prekey');
}
account.generate_one_time_keys(1);
@@ -73,7 +73,10 @@
prekey: notificationsPrekey,
prekeySignature: notificationsPrekeySignature,
oneTimeKey: notificationsOneTimeKey,
- } = await fetchCallUpdateOlmAccount('notifications', retrieveAccountKeysSet);
+ } = await fetchCallUpdateOlmAccount(
+ 'notifications',
+ retrieveSessionInitializationKeysSet,
+ );
const contentAccountCallback = async (account: OlmAccount) => {
const {
@@ -81,7 +84,7 @@
oneTimeKey,
prekey,
prekeySignature,
- } = await retrieveAccountKeysSet(account);
+ } = await retrieveSessionInitializationKeysSet(account);
const identityKeysBlob = {
primaryIdentityPublicKeys: JSON.parse(contentIdentityKeys),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 6:12 AM (17 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2515925
Default Alt Text
D9450.id32032.diff (1 KB)
Attached To
Mode
D9450: [keyserver] rename `retrieveAccountKeysSet` -> `retrieveSessionInitializationKeysSet`
Attached
Detach File
Event Timeline
Log In to Comment