Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32618672
D9450.1767461272.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D9450.1767461272.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
Sat, Jan 3, 5:27 PM (17 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5889950
Default Alt Text
D9450.1767461272.diff (1 KB)
Attached To
Mode
D9450: [keyserver] rename `retrieveAccountKeysSet` -> `retrieveSessionInitializationKeysSet`
Attached
Detach File
Event Timeline
Log In to Comment