HomePhabricator
Diffusion Comm dc24c82f4bb8

[lib] Introduce `MinimallyEncodedThreadCurrentUserInfo` and validator

Description

[lib] Introduce MinimallyEncodedThreadCurrentUserInfo and validator

Summary:
ThreadCurrentUserInfo type w/ permissions as string instead of ThreadPermissions.

Next diffs:

  • Introduce MinimallyEncodedRawThreadInfo
  • Higher level utilities for translating back/forth from RawThreadInfo <=> MinimallyEncodedRawThreadInfo. Found this to be cleaner API than encoding/decoding RawThreadInfo.currentUser.permissions and RawThreadInfo.members[memberID].permissions "manually" a bunch of different places.
  • Native refactoring + migrations
  • Web refactoring
  • Flipping the switch

Depends on D9731

Test Plan: Unit tests, will be tested implicitly in subsequent diffs as well.

Reviewers: ashoat, rohan, ginsu, tomek

Reviewed By: ashoat

Subscribers: ashoat, tomek, wyilio

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

Details

Provenance
atulAuthored on Nov 6 2023, 2:01 PM
Reviewer
ashoat
Differential Revision
D9734: [lib] Introduce `MinimallyEncodedThreadCurrentUserInfo` and validator
Parents
rCOMM3023e165ac6c: [lib] Introduce `MinimallyEncodedRoleInfo` and validator
Branches
Unknown
Tags
Unknown