Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3338270
D12994.id43164.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
934 B
Referenced Files
None
Subscribers
None
D12994.id43164.diff
View Options
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
@@ -260,6 +260,22 @@
.flat(),
);
+const getPeersUserAndDeviceIDs: (
+ state: BaseAppState<>,
+) => $ReadOnlyArray<{ +userID: string, +deviceID: string }> = createSelector(
+ (state: BaseAppState<>) => state.auxUserStore.auxUserInfos,
+ (
+ auxUserInfos: AuxUserInfos,
+ ): $ReadOnlyArray<{ +userID: string, +deviceID: string }> =>
+ entries(auxUserInfos).flatMap(
+ ([userID, { deviceList }]: [string, AuxUserInfo]) =>
+ deviceList?.devices.map(deviceID => ({
+ userID,
+ deviceID,
+ })) ?? [],
+ ),
+);
+
export {
userIDsToRelativeUserInfos,
getRelativeMemberInfos,
@@ -273,4 +289,5 @@
usersWithMissingDeviceListSelector,
getForeignPeerDevices,
getAllPeerDevices,
+ getPeersUserAndDeviceIDs,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 5:53 PM (17 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2563493
Default Alt Text
D12994.id43164.diff (934 B)
Attached To
Mode
D12994: [lib] Add selector to get peers user and device IDs
Attached
Detach File
Event Timeline
Log In to Comment