HomePhabricator
Diffusion Comm 7b262ca9855a

[lib] Update `convertClientDBThreadInfoToRawThreadInfo` to validate…

Description

[lib] Update convertClientDBThreadInfoToRawThreadInfo to validate ThreadCurrentUserInfo

Summary:
Similar to D10313 and D10298, this diff addresses what we learned when testing D10297 that it's important that we validate the stringified JSON that we retrieve from ClientDBThreadInfo. Specifically, it's possible for ClientDBThreadInfo to have either stringified MinimallyEncodedThreadCurrentInfo or ThreadCurrentInfo (yes, we didn't end up renaming this to LegacyThreadCurrentInfo because we didn't end up needing a union type, but I will change the name for symmetry) stored in the currentUser field, and we should A. validate that the data is correctly formed and B. determine what format the data is in.


Depends on D10313

Test Plan: Will be tested along with changes in D10297 and D10298 and D10313.

Reviewers: ashoat, ginsu, tomek, rohan

Reviewed By: ashoat

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