Page MenuHomePhabricator

[lib] Update signatures in `thread-utils` to handle `MinimallyEncodedThreadInfo`
ClosedPublic

Authored by atul on Nov 13 2023, 2:13 PM.
Tags
None
Referenced Files
F3246243: D9847.id33173.diff
Thu, Nov 14, 10:08 PM
F3246131: D9847.id33174.diff
Thu, Nov 14, 9:22 PM
Unknown Object (File)
Oct 15 2024, 7:35 PM
Unknown Object (File)
Oct 15 2024, 1:19 AM
Unknown Object (File)
Oct 15 2024, 1:19 AM
Unknown Object (File)
Oct 15 2024, 1:19 AM
Unknown Object (File)
Oct 15 2024, 1:19 AM
Unknown Object (File)
Oct 15 2024, 1:14 AM
Subscribers
None

Details

Summary

Similar to D9811, we're updating utilities in thread-utils to handle MinimallyEncodedThreadInfo where the change is as simple as updating fn signature.

Will now go through and handle the ones that require more refactoring/branching/etc. Specifically:

  • threadUIName
  • checkIfDefaultMembers
  • patchThreadInfoToIncludeMentionedMembersOfParent
  • useRoleUserSurfacedPermissions

Depends on D9846

Test Plan

Entirely flow for now.

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

lib/types/thread-types.js
51–55

Spreading MemberInfo causes fields to being "writeable."

This became an issue because I wrapped type definition of MinimallyEncodedRelativeMemberInfo in $ReadOnly<> which caused some flow issues.

I figure this is more "correct" anyways given we prefer read-only where possible?

atul published this revision for review.Nov 13 2023, 2:15 PM
This revision is now accepted and ready to land.Nov 13 2023, 2:31 PM
This revision was landed with ongoing or failed builds.Nov 13 2023, 3:02 PM
This revision was automatically updated to reflect the committed changes.