diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -1083,6 +1083,12 @@ return !!memberInfo.permissions[threadPermissions.CHANGE_ROLE]?.value; } +function roleIsDefaultRole( + roleInfo: ?ClientLegacyRoleInfo | ?RoleInfo, +): boolean { + return !!(roleInfo && roleInfo.isDefault); +} + function roleIsAdminRole(roleInfo: ?ClientLegacyRoleInfo | ?RoleInfo): boolean { return !!(roleInfo && !roleInfo.isDefault && roleInfo.name === 'Admins'); } @@ -1845,6 +1851,7 @@ threadInfoFromRawThreadInfo, threadTypeDescriptions, memberHasAdminPowers, + roleIsDefaultRole, roleIsAdminRole, threadHasAdminRole, identifyInvalidatedThreads,