Page MenuHomePhabricator

D11263.id38146.diff
No OneTemporary

D11263.id38146.diff

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

Mime Type
text/plain
Expires
Tue, Nov 26, 8:23 AM (16 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2583405
Default Alt Text
D11263.id38146.diff (941 B)

Event Timeline