Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3365241
D11263.id37907.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
941 B
Referenced Files
None
Subscribers
None
D11263.id37907.diff
View Options
diff --git a/lib/shared/user-utils.js b/lib/shared/user-utils.js
--- a/lib/shared/user-utils.js
+++ b/lib/shared/user-utils.js
@@ -1,6 +1,6 @@
// @flow
-import { memberHasAdminPowers } from './thread-utils.js';
+import { roleIsAdminRole } from './thread-utils.js';
import { useENSNames } from '../hooks/ens-cache.js';
import type {
ThreadInfo,
@@ -36,7 +36,10 @@
// This hack only works as long as there is only one admin
// Linear task to revert this:
// https://linear.app/comm/issue/ENG-1707/revert-fix-getting-the-keyserver-admin-info
- const admin = community.members.find(memberHasAdminPowers);
+ const { roles, members } = community;
+ const admin = members.find(member =>
+ member.role ? roleIsAdminRole(roles[member.role]) : false,
+ );
const adminUserInfo = admin ? userInfos[admin.id] : undefined;
const [adminUserInfoWithENSName] = useENSNames([adminUserInfo]);
return adminUserInfoWithENSName;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 7:01 AM (15 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2583405
Default Alt Text
D11263.id37907.diff (941 B)
Attached To
Mode
D11263: [lib] Remove usage of `memberHasAdminPowers` in `useKeyserverAdmin`
Attached
Detach File
Event Timeline
Log In to Comment