Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33574405
D12994.1769102650.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
942 B
Referenced Files
None
Subscribers
None
D12994.1769102650.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
Thu, Jan 22, 5:24 PM (15 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5979044
Default Alt Text
D12994.1769102650.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