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)
Sat, Dec 21, 7:52 PM
Unknown Object (File)
Wed, Dec 18, 1:07 AM
Unknown Object (File)
Wed, Dec 18, 1:07 AM
Unknown Object (File)
Wed, Dec 18, 1:07 AM
Unknown Object (File)
Wed, Dec 18, 1:06 AM
Unknown Object (File)
Wed, Dec 18, 1:06 AM
Unknown Object (File)
Fri, Nov 29, 4:16 PM
Unknown Object (File)
Fri, Nov 29, 3:05 PM
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.