Page MenuHomePhabricator

[lib] Update thread-utils to include specialRole field
ClosedPublic

Authored by atul on Nov 30 2023, 1:12 PM.
Tags
None
Referenced Files
F3372377: D10109.id36957.diff
Tue, Nov 26, 6:21 AM
Unknown Object (File)
Fri, Nov 1, 7:34 PM
Unknown Object (File)
Oct 25 2024, 6:06 PM
Unknown Object (File)
Oct 25 2024, 6:06 PM
Unknown Object (File)
Oct 25 2024, 6:06 PM
Unknown Object (File)
Oct 25 2024, 6:05 PM
Unknown Object (File)
Oct 25 2024, 6:01 PM
Unknown Object (File)
Oct 4 2024, 1:12 AM
Subscribers

Details

Summary

There are some places in the codebase that we hardcode isDefault. Here, we'll want to introduce the specialRole field alongside, so when we deprecate isDefault, no additional changes will be needed. Some are important (like one instance in thread-utils.js and the instance in role-creator.js where we set up initial roles for threads), and others are just test data. Nonetheless, I thought I may as well update all of them for consistency.

Part of ENG-5993

This diff handles thread-utils.js

Depends on D10108

Test Plan

Right now, just flow to make sure we didn't violate the type. Further testing can be done once isDefault is removed

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

rohan held this revision as a draft.
rohan published this revision for review.Nov 30 2023, 1:33 PM
This revision is now accepted and ready to land.Dec 4 2023, 12:23 AM
atul edited reviewers, added: rohan; removed: atul.
lib/shared/thread-utils.js
363–366 ↗(On Diff #36957)

FYI: utilities such as makePermissionsBlob will be updated as part of "permissions in member table" project so we can avoid constructing "legacy" permissions only to immediately minimally encode them.