Page MenuHomePhabricator

D13518.diff
No OneTemporary

D13518.diff

diff --git a/lib/actions/find-user-identities-actions.js b/lib/actions/find-user-identities-actions.js
new file mode 100644
--- /dev/null
+++ b/lib/actions/find-user-identities-actions.js
@@ -0,0 +1,19 @@
+// @flow
+
+import { useUserIdentityCache } from '../components/user-identity-cache.react.js';
+import type { UserIdentitiesResponse } from '../types/identity-service-types.js';
+
+const findUserIdentitiesActionTypes = Object.freeze({
+ started: 'FIND_USER_IDENTITIES_STARTED',
+ success: 'FIND_USER_IDENTITIES_SUCCESS',
+ failed: 'FIND_USER_IDENTITIES_FAILED',
+});
+
+function useFindUserIdentities(): (
+ userIDs: $ReadOnlyArray<string>,
+) => Promise<UserIdentitiesResponse> {
+ const userIdentityCache = useUserIdentityCache();
+ return userIdentityCache.getUserIdentities;
+}
+
+export { findUserIdentitiesActionTypes, useFindUserIdentities };
diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js
--- a/lib/actions/user-actions.js
+++ b/lib/actions/user-actions.js
@@ -4,7 +4,6 @@
import * as React from 'react';
import { useClearAllHolders } from './holder-actions.js';
-import { useUserIdentityCache } from '../components/user-identity-cache.react.js';
import {
useBroadcastDeviceListUpdates,
useBroadcastAccountDeletion,
@@ -60,10 +59,7 @@
} from '../types/avatar-types.js';
import type { DMChangeThreadSubscriptionOperation } from '../types/dm-ops';
import type { RawEntryInfo, CalendarQuery } from '../types/entry-types.js';
-import type {
- UserIdentitiesResponse,
- IdentityAuthResult,
-} from '../types/identity-service-types.js';
+import type { IdentityAuthResult } from '../types/identity-service-types.js';
import type {
RawMessageInfo,
MessageTruncationStatuses,
@@ -1378,19 +1374,6 @@
const processNewUserIDsActionType = 'PROCESS_NEW_USER_IDS';
-const findUserIdentitiesActionTypes = Object.freeze({
- started: 'FIND_USER_IDENTITIES_STARTED',
- success: 'FIND_USER_IDENTITIES_SUCCESS',
- failed: 'FIND_USER_IDENTITIES_FAILED',
-});
-
-function useFindUserIdentities(): (
- userIDs: $ReadOnlyArray<string>,
-) => Promise<UserIdentitiesResponse> {
- const userIdentityCache = useUserIdentityCache();
- return userIdentityCache.getUserIdentities;
-}
-
const versionSupportedByIdentityActionTypes = Object.freeze({
started: 'VERSION_SUPPORTED_BY_IDENTITY_STARTED',
success: 'VERSION_SUPPORTED_BY_IDENTITY_SUCCESS',
@@ -1458,8 +1441,6 @@
identityGenerateNonceActionTypes,
useIdentityGenerateNonce,
processNewUserIDsActionType,
- findUserIdentitiesActionTypes,
- useFindUserIdentities,
versionSupportedByIdentityActionTypes,
useVersionSupportedByIdentity,
};
diff --git a/lib/components/farcaster-data-handler.react.js b/lib/components/farcaster-data-handler.react.js
--- a/lib/components/farcaster-data-handler.react.js
+++ b/lib/components/farcaster-data-handler.react.js
@@ -3,9 +3,9 @@
import * as React from 'react';
import { setAuxUserFIDsActionType } from '../actions/aux-user-actions.js';
+import { useFindUserIdentities } from '../actions/find-user-identities-actions.js';
import { updateRelationshipsActionTypes } from '../actions/relationship-actions.js';
import { setSyncedMetadataEntryActionType } from '../actions/synced-metadata-actions.js';
-import { useFindUserIdentities } from '../actions/user-actions.js';
import { NeynarClientContext } from '../components/neynar-client-provider.react.js';
import { useIsLoggedInToIdentityAndAuthoritativeKeyserver } from '../hooks/account-hooks.js';
import { useUpdateRelationships } from '../hooks/relationship-hooks.js';
diff --git a/lib/handlers/user-infos-handler.react.js b/lib/handlers/user-infos-handler.react.js
--- a/lib/handlers/user-infos-handler.react.js
+++ b/lib/handlers/user-infos-handler.react.js
@@ -3,11 +3,11 @@
import invariant from 'invariant';
import * as React from 'react';
-import { updateRelationshipsActionTypes } from '../actions/relationship-actions.js';
import {
useFindUserIdentities,
findUserIdentitiesActionTypes,
-} from '../actions/user-actions.js';
+} from '../actions/find-user-identities-actions.js';
+import { updateRelationshipsActionTypes } from '../actions/relationship-actions.js';
import { useIsLoggedInToAuthoritativeKeyserver } from '../hooks/account-hooks.js';
import { useGetAndUpdateDeviceListsForUsers } from '../hooks/peer-list-hooks.js';
import { useUpdateRelationships } from '../hooks/relationship-hooks.js';
diff --git a/lib/reducers/user-reducer.js b/lib/reducers/user-reducer.js
--- a/lib/reducers/user-reducer.js
+++ b/lib/reducers/user-reducer.js
@@ -5,6 +5,7 @@
import { removePeerUsersActionType } from '../actions/aux-user-actions.js';
import { setClientDBStoreActionType } from '../actions/client-db-store-actions.js';
+import { findUserIdentitiesActionTypes } from '../actions/find-user-identities-actions.js';
import { legacySiweAuthActionTypes } from '../actions/siwe-actions.js';
import {
joinThreadActionTypes,
@@ -12,7 +13,6 @@
} from '../actions/thread-actions.js';
import { fetchPendingUpdatesActionTypes } from '../actions/update-actions.js';
import {
- findUserIdentitiesActionTypes,
processNewUserIDsActionType,
identityLogInActionTypes,
identityRegisterActionTypes,
diff --git a/lib/shared/dm-ops/dm-op-utils.js b/lib/shared/dm-ops/dm-op-utils.js
--- a/lib/shared/dm-ops/dm-op-utils.js
+++ b/lib/shared/dm-ops/dm-op-utils.js
@@ -11,7 +11,7 @@
} from './dm-op-spec.js';
import { dmOpSpecs } from './dm-op-specs.js';
import { useProcessAndSendDMOperation } from './process-dm-ops.js';
-import { useFindUserIdentities } from '../../actions/user-actions.js';
+import { useFindUserIdentities } from '../../actions/find-user-identities-actions.js';
import { useLoggedInUserInfo } from '../../hooks/account-hooks.js';
import { useGetLatestMessageEdit } from '../../hooks/latest-message-edit.js';
import { useGetAndUpdateDeviceListsForUsers } from '../../hooks/peer-list-hooks.js';

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 11:25 AM (21 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2575168
Default Alt Text
D13518.diff (5 KB)

Event Timeline