HomePhabricator
Diffusion Comm 4c1aa7dcb4bf

[web] Call useRoleNamesFromCommunityThreadInfo to help filter Admin members

Description

[web] Call useRoleNamesFromCommunityThreadInfo to help filter Admin members

Summary:
In an effort to unify the role name checking logic, I'm using useRoleNamesFromCommunityThreadInfo instead of memberIsAdmin(member, threadInfo) || memberHasAdminPowers(member), and then filtering out all of the role names that are not 'Admins'. This is the only way we have to check for Admins right now, but the isAdminRole work that's coming soon will help make these checks a lot more concrete.

Resolves https://linear.app/comm/issue/ENG-5178/ashoat-shows-up-under-admins-column-but-with-members-pill

Depends on D9430

Test Plan: Confirmed that all Admins show up when filtering out the members in both community roots and subchannels, and that GENESIS doesn't crash

Reviewers: ashoat, atul, ginsu

Reviewed By: atul

Subscribers: tomek, wyilio

Differential Revision: https://phab.comm.dev/D9513

Details