HomePhabricator
Diffusion Comm 51398b30f3e5

[lib] Add optional specialRole field to RoleInfo

Description

[lib] Add optional specialRole field to RoleInfo

Summary:
We want to introduce a specialRole field to the RoleInfo/LegacyRoleInfo type so we can include it when fetching threads/roles, and going forward perform checks on role.specialRole instead of relying on role.isDefault since this won't extend to checking for other special roles (like Admins).

This diff introduces this field as specialRole?: ?number to prevent flow errors. Towards the end of this stack, I plan to change this type to specialRole: ?number so we always include specialRole, whether it is a number or null.

Part of ENG-5994

Test Plan: Ran flow

Reviewers: ginsu, tomek, rohan

Reviewed By: tomek

Subscribers: ashoat

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

Details

Provenance
atulAuthored on Feb 6 2024, 10:05 AM
Reviewer
tomek
Differential Revision
D10105: [lib] Add optional specialRole field to RoleInfo
Parents
rCOMM6d1d91c2c28e: Prepare tests to cover missing SQLiteQueryExecutor queries
Branches
Unknown
Tags
Unknown