Page MenuHomePhabricator

[lib] Introduce `stripMemberPermissionsFromRawThreadInfo`
ClosedPublic

Authored by atul on Jul 15 2024, 6:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 11, 11:28 AM
Unknown Object (File)
Thu, Dec 5, 12:55 AM
Unknown Object (File)
Wed, Dec 4, 7:10 PM
Unknown Object (File)
Tue, Nov 26, 4:09 PM
Unknown Object (File)
Tue, Nov 26, 4:06 PM
Unknown Object (File)
Tue, Nov 26, 2:30 PM
Unknown Object (File)
Nov 22 2024, 11:37 PM
Unknown Object (File)
Nov 22 2024, 11:27 PM
Subscribers
None

Details

Summary

This utility will be helpful in rawThreadInfoFromServerThreadInfo and client migrations.


Depends on D12758

Test Plan

Added basic unit test, will continue testing implicitly with rest of stack.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Jul 15 2024, 6:52 PM
ashoat requested changes to this revision.Jul 17 2024, 12:20 PM

Love that you included tests! A bit confused about the invariant not matching the types – a couple questions inline

lib/utils/member-info-utils.js
19 ↗(On Diff #42306)

If we only expect to use this with ThinRawThreadInfo, why aren't we passing that type in here?

20 ↗(On Diff #42306)

Shouldn't we at least be able to return ThinRawThreadInfo given the invariant below?

This revision now requires changes to proceed.Jul 17 2024, 12:20 PM
lib/utils/member-info-utils.js
19 ↗(On Diff #42306)

Sorry, the changes to stripMemberPermissionsFromRawThreadInfo types got mistakenly included in another commit. Will move back into this commit.

Will need to go through and rebase whole stack because of various ESLint issues which didn't seem to surface when I was running yarn eslint:all locally.

move changes to stripMemberPermissionsFromRawThreadInfo into this diff

This revision is now accepted and ready to land.Jul 18 2024, 10:14 AM
This revision was landed with ongoing or failed builds.Jul 18 2024, 2:17 PM
This revision was automatically updated to reflect the committed changes.