Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3158216
D10830.id36252.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
861 B
Referenced Files
None
Subscribers
None
D10830.id36252.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
@@ -166,6 +166,15 @@
state.dataLoaded
);
+const isLoggedInToKeyserver: (
+ keyserverID: string,
+) => (state: BaseAppState<>) => boolean = _memoize(
+ (keyserverID: string) => (state: BaseAppState<>) => {
+ const cookie = state.keyserverStore.keyserverInfos[keyserverID]?.cookie;
+ return !!cookie && cookie.startsWith('user=');
+ },
+);
+
const usersWithPersonalThreadSelector: (
state: BaseAppState<>,
) => $ReadOnlySet<string> = createSelector(
@@ -212,6 +221,7 @@
relativeMemberInfoSelectorForMembersOfThread,
userInfoSelectorForPotentialMembers,
isLoggedIn,
+ isLoggedInToKeyserver,
usersWithPersonalThreadSelector,
savedEmojiAvatarSelectorForCurrentUser,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 6, 9:36 PM (22 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2431833
Default Alt Text
D10830.id36252.diff (861 B)
Attached To
Mode
D10830: [lib] Create a selector that checks if a user is logged in to a keyserver
Attached
Detach File
Event Timeline
Log In to Comment