Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3332698
D12994.id43175.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
942 B
Referenced Files
None
Subscribers
None
D12994.id43175.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 getAllPeerUserIDAndDeviceIDs: (
+ 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,
+ getAllPeerUserIDAndDeviceIDs,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 1:14 AM (20 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2559259
Default Alt Text
D12994.id43175.diff (942 B)
Attached To
Mode
D12994: [lib] Add selector to get peers user and device IDs
Attached
Detach File
Event Timeline
Log In to Comment