diff --git a/lib/keyserver-conn/recovery-utils.js b/lib/keyserver-conn/recovery-utils.js --- a/lib/keyserver-conn/recovery-utils.js +++ b/lib/keyserver-conn/recovery-utils.js @@ -1,6 +1,7 @@ // @flow import { type ActionTypes, setNewSession } from './keyserver-conn-types.js'; +import type { InitialNotifMessageOptions } from '../shared/crypto-utils.js'; import type { LogInActionSource, LogInStartingPayload, @@ -45,7 +46,9 @@ urlPrefix: string, logInActionSource: LogInActionSource, keyserverID: string, - getInitialNotificationsEncryptedMessage?: () => Promise, + getInitialNotificationsEncryptedMessage?: ( + options?: ?InitialNotifMessageOptions, + ) => Promise, ): Promise { const { resolveKeyserverSessionInvalidationUsingNativeCredentials } = getConfig(); diff --git a/lib/socket/socket.react.js b/lib/socket/socket.react.js --- a/lib/socket/socket.react.js +++ b/lib/socket/socket.react.js @@ -18,6 +18,7 @@ import { setNewSessionActionType } from '../keyserver-conn/keyserver-conn-types.js'; import { resolveKeyserverSessionInvalidation } from '../keyserver-conn/recovery-utils.js'; import { unsupervisedBackgroundActionType } from '../reducers/lifecycle-state-reducer.js'; +import type { InitialNotifMessageOptions } from '../shared/crypto-utils.js'; import { pingFrequency, serverRequestSocketTimeout, @@ -108,7 +109,9 @@ // async functions that hit server APIs +socketCrashLoopRecovery?: () => Promise, // keyserver olm sessions specific props - +getInitialNotificationsEncryptedMessage?: () => Promise, + +getInitialNotificationsEncryptedMessage?: ( + options?: ?InitialNotifMessageOptions, + ) => Promise, }; type State = { +inflightRequests: ?InflightRequests, diff --git a/lib/utils/config.js b/lib/utils/config.js --- a/lib/utils/config.js +++ b/lib/utils/config.js @@ -5,6 +5,7 @@ import type { CallSingleKeyserverEndpoint } from './call-single-keyserver-endpoint.js'; import type { CallKeyserverEndpoint } from './keyserver-call.js'; import type { DispatchRecoveryAttempt } from '../keyserver-conn/keyserver-conn-types.js'; +import type { InitialNotifMessageOptions } from '../shared/crypto-utils.js'; import type { LogInActionSource } from '../types/account-types.js'; import type { PlatformDetails } from '../types/device-types.js'; @@ -15,7 +16,9 @@ dispatchRecoveryAttempt: DispatchRecoveryAttempt, logInActionSource: LogInActionSource, keyserverID: string, - getInitialNotificationsEncryptedMessage?: () => Promise, + getInitialNotificationsEncryptedMessage?: ( + options?: ?InitialNotifMessageOptions, + ) => Promise, ) => Promise, +setSessionIDOnRequest: boolean, +calendarRangeInactivityLimit: ?number,