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
Unknown Object (File)
Apr 8 2024, 8:41 AM
Unknown Object (File)
Apr 8 2024, 8:41 AM
Unknown Object (File)
Apr 8 2024, 8:41 AM
Unknown Object (File)
Apr 8 2024, 8:41 AM
Unknown Object (File)
Apr 8 2024, 8:41 AM
Unknown Object (File)
Apr 7 2024, 1:54 PM
Unknown Object (File)
Apr 6 2024, 9:33 AM
Unknown Object (File)
Apr 3 2024, 4:17 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
Lint Not Applicable
Unit
Tests Not Applicable

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.