Page MenuHomePhabricator

D6956.diff
No OneTemporary

D6956.diff

diff --git a/lib/selectors/socket-selectors.js b/lib/selectors/socket-selectors.js
--- a/lib/selectors/socket-selectors.js
+++ b/lib/selectors/socket-selectors.js
@@ -9,6 +9,7 @@
filterRawEntryInfosByCalendarQuery,
} from '../shared/entry-utils.js';
import threadWatcher from '../shared/thread-watcher.js';
+import type { SignedIdentityKeysBlob } from '../types/crypto-types.js';
import type { RawEntryInfo, CalendarQuery } from '../types/entry-types.js';
import type { AppState } from '../types/redux-types.js';
import type { ClientReportCreationRequest } from '../types/report-types.js';
@@ -39,6 +40,7 @@
) => (
calendarActive: boolean,
oneTimeKeyGenerator: ?OneTimeKeyGenerator,
+ getSignedIdentityKeysBlob: ?() => SignedIdentityKeysBlob,
serverRequests: $ReadOnlyArray<ClientServerRequest>,
) => $ReadOnlyArray<ClientClientResponse> = createSelector(
(state: AppState) => state.threadStore.threadInfos,
@@ -56,6 +58,7 @@
(
calendarActive: boolean,
oneTimeKeyGenerator: ?OneTimeKeyGenerator,
+ getSignedIdentityKeysBlob: ?() => SignedIdentityKeysBlob,
serverRequests: $ReadOnlyArray<ClientServerRequest>,
): $ReadOnlyArray<ClientClientResponse> => {
const clientResponses = [];
@@ -157,6 +160,15 @@
type: serverRequestTypes.MORE_ONE_TIME_KEYS,
keys,
});
+ } else if (
+ serverRequest.type === serverRequestTypes.SIGNED_IDENTITY_KEYS_BLOB &&
+ getSignedIdentityKeysBlob
+ ) {
+ const signedIdentityKeysBlob = getSignedIdentityKeysBlob();
+ clientResponses.push({
+ type: serverRequestTypes.SIGNED_IDENTITY_KEYS_BLOB,
+ signedIdentityKeysBlob,
+ });
}
}
return clientResponses;
diff --git a/native/selectors/socket-selectors.js b/native/selectors/socket-selectors.js
--- a/native/selectors/socket-selectors.js
+++ b/native/selectors/socket-selectors.js
@@ -7,6 +7,7 @@
sessionStateFuncSelector,
} from 'lib/selectors/socket-selectors.js';
import { createOpenSocketFunction } from 'lib/shared/socket-utils.js';
+import type { SignedIdentityKeysBlob } from 'lib/types/crypto-types.js';
import type {
ClientServerRequest,
ClientClientResponse,
@@ -61,6 +62,7 @@
getClientResponsesFunc: (
calendarActive: boolean,
oneTimeKeyGenerator: ?OneTimeKeyGenerator,
+ getSignedIdentityKeysBlob: ?() => SignedIdentityKeysBlob,
serverRequests: $ReadOnlyArray<ClientServerRequest>,
) => $ReadOnlyArray<ClientClientResponse>,
calendarActive: boolean,
@@ -69,6 +71,7 @@
getClientResponsesFunc(
calendarActive,
oneTimeKeyGenerator,
+ null,
serverRequests,
),
);
diff --git a/web/selectors/socket-selectors.js b/web/selectors/socket-selectors.js
--- a/web/selectors/socket-selectors.js
+++ b/web/selectors/socket-selectors.js
@@ -7,6 +7,7 @@
sessionStateFuncSelector,
} from 'lib/selectors/socket-selectors.js';
import { createOpenSocketFunction } from 'lib/shared/socket-utils.js';
+import type { SignedIdentityKeysBlob } from 'lib/types/crypto-types.js';
import type {
ClientServerRequest,
ClientClientResponse,
@@ -42,12 +43,13 @@
getClientResponsesFunc: (
calendarActive: boolean,
oneTimeKeyGenerator: ?OneTimeKeyGenerator,
+ getSignedIdentityKeysBlob: ?() => SignedIdentityKeysBlob,
serverRequests: $ReadOnlyArray<ClientServerRequest>,
) => $ReadOnlyArray<ClientClientResponse>,
calendarActive: boolean,
) =>
(serverRequests: $ReadOnlyArray<ClientServerRequest>) =>
- getClientResponsesFunc(calendarActive, null, serverRequests),
+ getClientResponsesFunc(calendarActive, null, null, serverRequests),
);
const webSessionStateFuncSelector: (state: AppState) => () => SessionState =

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 3:08 PM (21 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597360
Default Alt Text
D6956.diff (3 KB)

Event Timeline