HomePhabricator
Diffusion Comm 00f2222fe0dc

[lib] Introduce `getMinimallyEncodedCurrentUser`

Description

[lib] Introduce getMinimallyEncodedCurrentUser

Summary:
Unfortunately was not able to update getCurrentUser to handle both ThreadInfo|RawThreadInfo AND MinimallyEncodedRawThreadInfo while keeping flow happy.

Here was where I ended up in my attempts:
https://gist.github.com/atulsmadhugiri/cdaa18c6883a5636d1e035b520c47e79#file-blah-js

Fortunately, getCurrentUser info is only used in two places in thread-utils and those can be updated with minimallyEncoded toggle.


Depends on D9839

Test Plan: Will add unit tests once Flow issues are resolved.

Reviewers: ashoat, ginsu, tomek, rohan

Reviewed By: ashoat

Subscribers: wyilio

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

Details

Provenance
atulAuthored on Nov 13 2023, 10:43 AM
Reviewer
ashoat
Differential Revision
D9840: [lib] Introduce `getMinimallyEncodedCurrentUser`
Parents
rCOMMbbaea7e59505: [lib] Update `memberHasAdminPowers` to handle `MinimallyEncodedMemberInfo`
Branches
Unknown
Tags
Unknown