HomePhabricator
Diffusion Comm 509ef589a60d

[lib] Narrow types in `memberHasAdminPowers` call stack to remove `invariant`

Description

[lib] Narrow types in memberHasAdminPowers call stack to remove invariant

Summary:
Narrow types from innerThreadFrozenDueToBlock down to memberHasAdminPowers, removing ThreadInfo and RelativeMemberInfo such that we can remove the invariant introduced in D12265.

We're now good with removing permissions field from ThreadInfo, now we just need to remove it from RawThreadInfo and we can proceed to migration and toggling shape of RawThreadInfo on keyserver based on codeVersion checks.

There's some tidying up to do eg removing skipMemberAdminRoleCheck and pulling out logic common to threadIsWithBlockedUserOnly and threadIsWithBlockedUserOnlyWithoutAdminRoleCheck, but will handle those in followup diffs for convenience.


Depends on D12290

Test Plan: just flow.

Reviewers: ashoat, ginsu, tomek, varun

Reviewed By: ashoat, tomek

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

Details

Provenance
atulAuthored on Jun 16 2024, 5:43 PM
Reviewer
ashoat
Differential Revision
D12292: [lib] Narrow types in `memberHasAdminPowers` call stack to remove `invariant`
Parents
rCOMM940b2ff9147f: [lib] Replace `innerThreadFrozenDueToBlock` with…
Branches
Unknown
Tags
Unknown