HomePhabricator
Diffusion Comm f6cf1bfc29fd

[lib] Update `threadMemberHasPermission` to support…

Description

[lib] Update threadMemberHasPermission to support MinimallyEncodedRawThreadInfo

Summary:
Check minimally encoded permissions for permission via hasPermission in threadMemberHasPermission based on minimallyEncoded flag.

NOTE: One thing I noticed when I was making this change was that permissionLookup always checks for the threadPermissions.KNOW_OF permission during permissions checks and fails all checks where KNOW_OF isn't present. Looks like this logic was added by @ashoat in https://phab.comm.dev/D1213. If this is still relevant, should I update hasPermission to always ensure that KNOW_OF bit is set?

Depends on D9840

Test Plan: Will add unit tests in future, for now counting on Flow.

Reviewers: ashoat, ginsu, tomek, rohan

Reviewed By: ashoat

Subscribers: wyilio, ashoat

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

Details

Provenance
atulAuthored on Nov 13 2023, 11:15 AM
Reviewer
ashoat
Differential Revision
D9841: [lib] Update `threadMemberHasPermission` to support `MinimallyEncodedRawThreadInfo`
Parents
rCOMM00f2222fe0dc: [lib] Introduce `getMinimallyEncodedCurrentUser`
Branches
Unknown
Tags
Unknown