Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3097735
D9585.id32359.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9585.id32359.diff
View Options
diff --git a/native/account/resolve-invalidated-cookie.js b/native/account/resolve-invalidated-cookie.js
--- a/native/account/resolve-invalidated-cookie.js
+++ b/native/account/resolve-invalidated-cookie.js
@@ -9,12 +9,15 @@
import { getGlobalNavContext } from '../navigation/icky-global.js';
import { store } from '../redux/redux-setup.js';
import { nativeLogInExtraInfoSelector } from '../selectors/account-selectors.js';
+import type { InitialNotifMessageOptions } from '../utils/crypto-utils.js';
async function resolveInvalidatedCookie(
callServerEndpoint: CallServerEndpoint,
dispatchRecoveryAttempt: DispatchRecoveryAttempt,
logInActionSource: LogInActionSource,
- getInitialNotificationsEncryptedMessage?: () => Promise<string>,
+ getInitialNotificationsEncryptedMessage?: (
+ ?InitialNotifMessageOptions,
+ ) => Promise<string>,
) {
const keychainCredentials = await fetchNativeKeychainCredentials();
if (!keychainCredentials) {
@@ -27,7 +30,7 @@
if (getInitialNotificationsEncryptedMessage) {
const initialNotificationsEncryptedMessage =
- await getInitialNotificationsEncryptedMessage();
+ await getInitialNotificationsEncryptedMessage({ callServerEndpoint });
extraInfo = { ...extraInfo, initialNotificationsEncryptedMessage };
}
diff --git a/native/utils/crypto-utils.js b/native/utils/crypto-utils.js
--- a/native/utils/crypto-utils.js
+++ b/native/utils/crypto-utils.js
@@ -10,11 +10,15 @@
useServerCall,
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
-import type { CallServerEndpointOptions } from 'lib/utils/call-server-endpoint.js';
+import type {
+ CallServerEndpoint,
+ CallServerEndpointOptions,
+} from 'lib/utils/call-server-endpoint.js';
import { commCoreModule } from '../native-modules.js';
-type InitialNotifMessageOptions = {
+export type InitialNotifMessageOptions = {
+ +callServerEndpoint?: ?CallServerEndpoint,
+callServerEndpointOptions?: ?CallServerEndpointOptions,
};
function useInitialNotificationsEncryptedMessage(): (
@@ -27,10 +31,13 @@
return React.useCallback(
async options => {
+ const callServerEndpoint = options?.callServerEndpoint;
const callServerEndpointOptions = options?.callServerEndpointOptions;
- const olmSessionDataPromise = callGetOlmSessionInitializationData(
- callServerEndpointOptions,
- );
+
+ const initDataAction = callServerEndpoint
+ ? getOlmSessionInitializationData(callServerEndpoint)
+ : callGetOlmSessionInitializationData;
+ const olmSessionDataPromise = initDataAction(callServerEndpointOptions);
dispatchActionPromise(
getOlmSessionInitializationDataActionTypes,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 30, 4:18 PM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2387523
Default Alt Text
D9585.id32359.diff (2 KB)
Attached To
Mode
D9585: [native] Use recovery callServerEndpoint when fetching notif keys in resolveInvalidatedCookie
Attached
Detach File
Event Timeline
Log In to Comment