Page MenuHomePhabricator

[lib] Refactor getThreadOtherUsers and all its occurrences
ClosedPublic

Authored by przemek on Nov 18 2022, 7:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 8:57 PM
Unknown Object (File)
Tue, Apr 23, 8:57 PM
Unknown Object (File)
Tue, Apr 23, 8:57 PM
Unknown Object (File)
Tue, Apr 23, 8:52 PM
Unknown Object (File)
Mar 1 2024, 6:25 PM
Unknown Object (File)
Feb 18 2024, 11:38 AM
Unknown Object (File)
Feb 18 2024, 11:08 AM
Unknown Object (File)
Feb 18 2024, 8:22 AM

Details

Summary

I refactored getThreadOtherUsers: changed its name so it matches methods around and
make it return (Relative)MemberInfo's instead of IDs. It was only used in thread-utils.js and
it was easy to changed places where it was called. I need it in that form in typeahead, so I figured
it's fine to extend that function instead of creating another almost identical one.

Test Plan

Tested in furhter diffs.
Visible and works correctly returning all users excluding ashoat and viewer.
Performed sanity check if I didn't break the function (traced one of the functions (getSingleOtherUser) that called it and it performed as expected (in Relationship Prompt))

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul retitled this revision from [lib] Refactor getThreadOtherUsers and all its occurances to [lib] Refactor getThreadOtherUsers and all its occurrences.Nov 18 2022, 1:43 PM
This revision is now accepted and ready to land.Nov 21 2022, 4:15 AM

Please include in the test plan a description of how existing functionality was tested.

Done. It would be nice to have unit tests covering utility functions like that. Probably will mention it during today's monthly planning.