Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3398448
D7860.id26783.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
D7860.id26783.diff
View Options
diff --git a/keyserver/src/socket/session-utils.js b/keyserver/src/socket/session-utils.js
--- a/keyserver/src/socket/session-utils.js
+++ b/keyserver/src/socket/session-utils.js
@@ -41,6 +41,7 @@
tPlatformDetails,
} from 'lib/utils/validation-utils.js';
+import { createOlmSession } from '../creators/olm-session-creator.js';
import { saveOneTimeKeys } from '../creators/one-time-keys-creator.js';
import createReport from '../creators/report-creator.js';
import { SQL } from '../database/database.js';
@@ -131,6 +132,13 @@
),
signedIdentityKeysBlob: signedIdentityKeysBlobValidator,
}),
+ tShape({
+ type: t.irreducible(
+ 'serverRequestTypes.INITIAL_NOTIFICATIONS_ENCRYPTED_MESSAGE',
+ x => x === serverRequestTypes.INITIAL_NOTIFICATIONS_ENCRYPTED_MESSAGE,
+ ),
+ initialNotificationsEncryptedMessage: t.String,
+ }),
]);
type StateCheckStatus =
@@ -230,6 +238,24 @@
} catch (e) {
continue;
}
+ } else if (
+ clientResponse.type ===
+ serverRequestTypes.INITIAL_NOTIFICATIONS_ENCRYPTED_MESSAGE
+ ) {
+ invariant(
+ t.String.is(clientResponse.initialNotificationsEncryptedMessage),
+ 'initialNotificationsEncryptedMessage expected in client response',
+ );
+ const { initialNotificationsEncryptedMessage } = clientResponse;
+ try {
+ await createOlmSession(
+ initialNotificationsEncryptedMessage,
+ 'notifications',
+ viewer.cookieID,
+ );
+ } catch (e) {
+ continue;
+ }
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 2, 11:03 PM (18 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2608862
Default Alt Text
D7860.id26783.diff (1 KB)
Attached To
Mode
D7860: Handle client response to initial notifications encrypted message request
Attached
Detach File
Event Timeline
Log In to Comment