Page MenuHomePhabricator

[lib] Remove `rawThreadInfoFromThreadInfo` from `ThreadUtils`
ClosedPublic

Authored by atul on Apr 6 2023, 3:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 12, 5:38 PM
Unknown Object (File)
Tue, Jun 11, 10:58 PM
Unknown Object (File)
Thu, May 30, 3:46 AM
Unknown Object (File)
Thu, May 30, 3:46 AM
Unknown Object (File)
Thu, May 30, 3:46 AM
Unknown Object (File)
Thu, May 30, 1:20 AM
Unknown Object (File)
May 26 2024, 1:12 AM
Unknown Object (File)
May 25 2024, 12:44 AM
Subscribers

Details

Summary

I've been looking throughout the codebase at where we construct [Raw]ThreadInfos to see if any changes need to be made to accomodate the new avatar field. This function (the inverse of threadInfoFromRawThreadInfo) would need to be updated in order to be correct.

However, as far as I can tell this function was introduced > 5 years ago (https://github.com/CommE2E/comm/commit/d362e782f5ac42a5b5d0393854936f2c7bc7975c) and has never been used since. Last time it was updated was to include sourceMessageID field (https://github.com/CommE2E/comm/commit/56d525d49034ced5a69b37d91215fcb65bccff4b) to maintain correctness.

I'm personally in favor of removing this code altogether instead of keeping an unused piece of code "correct." I think if someone does need something like this in the future it should be fairly straightforward to recreate.

However, open to abandoning this diff and including avatar in rawThreadInfoFromThreadInfo if that would be preferred.

Test Plan

NA, code quality tools ie flow/eslint

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Apr 6 2023, 4:04 PM

looks good, but will defer to @ashoat for the final say

This revision is now accepted and ready to land.Apr 6 2023, 4:15 PM

Yeah I had the same thought last time I saw this. Let's remove it

This revision was landed with ongoing or failed builds.Apr 7 2023, 8:53 AM
This revision was automatically updated to reflect the committed changes.