Page MenuHomePhabricator

D11221.diff
No OneTemporary

D11221.diff

diff --git a/lib/components/keyserver-connection-handler.js b/lib/components/keyserver-connection-handler.js
--- a/lib/components/keyserver-connection-handler.js
+++ b/lib/components/keyserver-connection-handler.js
@@ -10,7 +10,10 @@
useLogOut,
} from '../actions/user-actions.js';
import { extractKeyserverIDFromID } from '../keyserver-conn/keyserver-call-utils.js';
-import { setNewSession } from '../keyserver-conn/keyserver-conn-types.js';
+import {
+ setNewSession,
+ CANCELLED_ERROR,
+} from '../keyserver-conn/keyserver-conn-types.js';
import { resolveKeyserverSessionInvalidation } from '../keyserver-conn/recovery-utils.js';
import { filterThreadIDsInFilterList } from '../reducers/calendar-filters-reducer.js';
import {
@@ -42,7 +45,6 @@
};
const AUTH_RETRY_DELAY_MS = 60000;
-const CANCELLED_ERROR = 'cancelled';
function KeyserverConnectionHandler(props: Props) {
const { socketComponent: Socket, ...socketProps } = props;
diff --git a/lib/keyserver-conn/keyserver-conn-types.js b/lib/keyserver-conn/keyserver-conn-types.js
--- a/lib/keyserver-conn/keyserver-conn-types.js
+++ b/lib/keyserver-conn/keyserver-conn-types.js
@@ -33,8 +33,8 @@
startingPayload: LogInStartingPayload,
) => Promise<boolean>;
-const setNewSessionActionType = 'SET_NEW_SESSION';
-function setNewSession(
+export const setNewSessionActionType = 'SET_NEW_SESSION';
+export function setNewSession(
dispatch: Dispatch,
sessionChange: ClientSessionChange,
preRequestUserState: ?PreRequestUserState,
@@ -95,4 +95,6 @@
export const setActiveSessionRecoveryActionType = 'SET_ACTIVE_SESSION_RECOVERY';
-export { setNewSessionActionType, setNewSession };
+// We pass this string to the Error constructor when dispatching a _FAILED
+// action via throwing in the promise that we pass to dispatchActionPromise
+export const CANCELLED_ERROR = 'cancelled';

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 7:03 PM (19 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580748
Default Alt Text
D11221.diff (1 KB)

Event Timeline