Page MenuHomePhabricator

D12994.id43175.diff
No OneTemporary

D12994.id43175.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 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

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)

Event Timeline