Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32354367
D13035.1765317686.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D13035.1765317686.diff
View Options
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
@@ -19,7 +19,7 @@
import { useKeyserverCall } from '../keyserver-conn/keyserver-call.js';
import type { CallKeyserverEndpoint } from '../keyserver-conn/keyserver-conn-types.js';
import { usePreRequestUserState } from '../selectors/account-selectors.js';
-import { getForeignPeerDevices } from '../selectors/user-selectors.js';
+import { getForeignPeerDeviceIDs } from '../selectors/user-selectors.js';
import {
getOneTimeKeyValuesFromBlob,
getPrekeyValueFromBlob,
@@ -265,7 +265,7 @@
const broadcastDeviceListUpdates = useBroadcastDeviceListUpdates();
const { broadcastEphemeralMessage } = usePeerToPeerCommunication();
- const foreignPeerDevices = useSelector(getForeignPeerDevices);
+ const foreignPeerDevices = useSelector(getForeignPeerDeviceIDs);
const logOut = useLogOut(primaryDeviceLogOutOptions);
return React.useCallback(async () => {
diff --git a/lib/selectors/user-selectors.js b/lib/selectors/user-selectors.js
--- a/lib/selectors/user-selectors.js
+++ b/lib/selectors/user-selectors.js
@@ -235,23 +235,23 @@
// Foreign Peer Devices are all devices of users we are aware of,
// but not our own devices.
-const getForeignPeerDevices: (state: BaseAppState<>) => $ReadOnlyArray<string> =
- createSelector(
- (state: BaseAppState<>) => state.auxUserStore.auxUserInfos,
- (state: BaseAppState<>) =>
- state.currentUserInfo && state.currentUserInfo.id,
- (
- auxUserInfos: AuxUserInfos,
- currentUserID: ?string,
- ): $ReadOnlyArray<string> =>
- entries(auxUserInfos)
- .map(([userID, auxUserInfo]: [string, AuxUserInfo]) =>
- userID !== currentUserID && auxUserInfo.deviceList?.devices
- ? auxUserInfo.deviceList.devices
- : [],
- )
- .flat(),
- );
+const getForeignPeerDeviceIDs: (
+ state: BaseAppState<>,
+) => $ReadOnlyArray<string> = createSelector(
+ (state: BaseAppState<>) => state.auxUserStore.auxUserInfos,
+ (state: BaseAppState<>) => state.currentUserInfo && state.currentUserInfo.id,
+ (
+ auxUserInfos: AuxUserInfos,
+ currentUserID: ?string,
+ ): $ReadOnlyArray<string> =>
+ entries(auxUserInfos)
+ .map(([userID, auxUserInfo]: [string, AuxUserInfo]) =>
+ userID !== currentUserID && auxUserInfo.deviceList?.devices
+ ? auxUserInfo.deviceList.devices
+ : [],
+ )
+ .flat(),
+);
export type DeviceIDAndPlatformDetails = {
+deviceID: string,
@@ -330,7 +330,7 @@
savedEmojiAvatarSelectorForCurrentUser,
getRelativeUserIDs,
usersWithMissingDeviceListSelector,
- getForeignPeerDevices,
+ getForeignPeerDeviceIDs,
getOwnPeerDevices,
getKeyserverDeviceID,
getAllPeerDevices,
diff --git a/lib/tunnelbroker/use-peer-to-peer-message-handler.js b/lib/tunnelbroker/use-peer-to-peer-message-handler.js
--- a/lib/tunnelbroker/use-peer-to-peer-message-handler.js
+++ b/lib/tunnelbroker/use-peer-to-peer-message-handler.js
@@ -14,7 +14,7 @@
} from '../hooks/peer-list-hooks.js';
import {
getAllPeerDevices,
- getForeignPeerDevices,
+ getForeignPeerDeviceIDs,
} from '../selectors/user-selectors.js';
import {
verifyAndGetDeviceList,
@@ -164,7 +164,7 @@
invariant(identityContext, 'Identity context should be set');
const { identityClient, getAuthMetadata } = identityContext;
- const foreignPeerDevices = useSelector(getForeignPeerDevices);
+ const foreignPeerDevices = useSelector(getForeignPeerDeviceIDs);
const broadcastDeviceListUpdates = useBroadcastDeviceListUpdates();
const getAndUpdateDeviceListsForUsers = useGetAndUpdateDeviceListsForUsers();
diff --git a/native/profile/secondary-device-qr-code-scanner.react.js b/native/profile/secondary-device-qr-code-scanner.react.js
--- a/native/profile/secondary-device-qr-code-scanner.react.js
+++ b/native/profile/secondary-device-qr-code-scanner.react.js
@@ -11,7 +11,7 @@
useBroadcastDeviceListUpdates,
useGetAndUpdateDeviceListsForUsers,
} from 'lib/hooks/peer-list-hooks.js';
-import { getForeignPeerDevices } from 'lib/selectors/user-selectors.js';
+import { getForeignPeerDeviceIDs } from 'lib/selectors/user-selectors.js';
import { addDeviceToDeviceList } from 'lib/shared/device-list-utils.js';
import { IdentityClientContext } from 'lib/shared/identity-client-context.js';
import { useTunnelbroker } from 'lib/tunnelbroker/tunnelbroker-context.js';
@@ -73,7 +73,7 @@
const broadcastDeviceListUpdates = useBroadcastDeviceListUpdates();
const getAndUpdateDeviceListsForUsers = useGetAndUpdateDeviceListsForUsers();
- const foreignPeerDevices = useSelector(getForeignPeerDevices);
+ const foreignPeerDevices = useSelector(getForeignPeerDeviceIDs);
const { panelForegroundTertiaryLabel } = useColors();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 9, 10:01 PM (14 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5858151
Default Alt Text
D13035.1765317686.diff (4 KB)
Attached To
Mode
D13035: [lib] rename getForeignPeerDevices -> getForeignPeerDeviceIDs
Attached
Detach File
Event Timeline
Log In to Comment