HomePhabricator
Diffusion Comm f5744fb7ad28

[lib] Remove `rawThreadInfoFromThreadInfo` from `ThreadUtils`

Description

[lib] Remove rawThreadInfoFromThreadInfo from ThreadUtils

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

Reviewers: ginsu, ashoat

Reviewed By: ginsu, ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D7340

Details

Provenance
atulAuthored on Apr 7 2023, 8:43 AM
Reviewer
ginsu
Differential Revision
D7340: [lib] Remove `rawThreadInfoFromThreadInfo` from `ThreadUtils`
Parents
rCOMM19613c3beb46: [keyserver] Add migration - process messages in our db for search
Branches
Unknown
Tags
Unknown