Page MenuHomePhabricator

D12994.id43164.diff
No OneTemporary

D12994.id43164.diff

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

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)

Event Timeline