Page MenuHomePhabricator

D10576.id35396.diff
No OneTemporary

D10576.id35396.diff

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
@@ -67,7 +67,7 @@
import type { DispatchActionPromise } from '../utils/action-utils.js';
import {
setNewSessionActionType,
- fetchNewCookieFromNativeCredentials,
+ resolveKeyserverSessionInvalidation,
} from '../utils/action-utils.js';
import { getConfig } from '../utils/config.js';
import { ServerError, SocketTimeout, SocketOffline } from '../utils/errors.js';
@@ -482,7 +482,7 @@
const cookie = sessionChange ? sessionChange.cookie : this.props.cookie;
this.invalidationRecoveryInProgress = true;
- const recoverySessionChange = await fetchNewCookieFromNativeCredentials(
+ const recoverySessionChange = await resolveKeyserverSessionInvalidation(
this.props.dispatch,
cookie,
this.props.urlPrefix,
diff --git a/lib/utils/action-utils.js b/lib/utils/action-utils.js
--- a/lib/utils/action-utils.js
+++ b/lib/utils/action-utils.js
@@ -190,7 +190,7 @@
// here, on the assumption that only native clients will call this. (Native
// clients don't specify a sessionID, indicating to the server that it should
// use the cookieID as the sessionID.)
-async function fetchNewCookieFromNativeCredentials(
+async function resolveKeyserverSessionInvalidation(
dispatch: Dispatch,
cookie: ?string,
urlPrefix: string,
@@ -351,7 +351,7 @@
sessionChange: ClientSessionChange,
) => {
const newAnonymousCookie = sessionChange.cookie;
- const newSessionChange = await fetchNewCookieFromNativeCredentials(
+ const newSessionChange = await resolveKeyserverSessionInvalidation(
dispatch,
newAnonymousCookie,
urlPrefix,
@@ -600,7 +600,7 @@
export {
useDispatchActionPromise,
setNewSessionActionType,
- fetchNewCookieFromNativeCredentials,
+ resolveKeyserverSessionInvalidation,
createBoundServerCallsSelector,
registerActiveSocket,
useServerCall,
diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -26,7 +26,7 @@
import { useInitialNotificationsEncryptedMessage } from 'lib/shared/crypto-utils.js';
import { logInActionSources } from 'lib/types/account-types.js';
import type { Dispatch } from 'lib/types/redux-types.js';
-import { fetchNewCookieFromNativeCredentials } from 'lib/utils/action-utils.js';
+import { resolveKeyserverSessionInvalidation } from 'lib/utils/action-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
@@ -432,7 +432,7 @@
const actionSource = loggedIn
? logInActionSources.appStartReduxLoggedInButInvalidCookie
: logInActionSources.appStartCookieLoggedInButInvalidRedux;
- const sessionChange = await fetchNewCookieFromNativeCredentials(
+ const sessionChange = await resolveKeyserverSessionInvalidation(
dispatch,
cookie,
urlPrefix,
diff --git a/native/data/sqlite-data-handler.js b/native/data/sqlite-data-handler.js
--- a/native/data/sqlite-data-handler.js
+++ b/native/data/sqlite-data-handler.js
@@ -18,7 +18,7 @@
logInActionSources,
type LogInActionSource,
} from 'lib/types/account-types.js';
-import { fetchNewCookieFromNativeCredentials } from 'lib/utils/action-utils.js';
+import { resolveKeyserverSessionInvalidation } from 'lib/utils/action-utils.js';
import { getMessageForException } from 'lib/utils/errors.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
@@ -65,7 +65,7 @@
const callFetchNewCookieFromNativeCredentials = React.useCallback(
async (source: LogInActionSource) => {
try {
- await fetchNewCookieFromNativeCredentials(
+ await resolveKeyserverSessionInvalidation(
dispatch,
cookie,
urlPrefix,
diff --git a/native/socket.react.js b/native/socket.react.js
--- a/native/socket.react.js
+++ b/native/socket.react.js
@@ -18,7 +18,7 @@
import { setConnectionIssueActionType } from 'lib/types/socket-types.js';
import {
useDispatchActionPromise,
- fetchNewCookieFromNativeCredentials,
+ resolveKeyserverSessionInvalidation,
} from 'lib/utils/action-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
@@ -132,7 +132,7 @@
return;
}
- await fetchNewCookieFromNativeCredentials(
+ await resolveKeyserverSessionInvalidation(
dispatch,
cookie,
urlPrefix,

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 27, 10:54 PM (6 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2721477
Default Alt Text
D10576.id35396.diff (4 KB)

Event Timeline