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)
Sat, Nov 16, 10:13 AM
Unknown Object (File)
Fri, Nov 8, 10:00 AM
Unknown Object (File)
Wed, Nov 6, 3:29 AM
Unknown Object (File)
Wed, Nov 6, 3:29 AM
Unknown Object (File)
Tue, Nov 5, 10:05 PM
Unknown Object (File)
Tue, Nov 5, 10:05 PM
Unknown Object (File)
Tue, Nov 5, 2:33 AM
Unknown Object (File)
Oct 28 2024, 2:26 PM
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
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

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.