Page MenuHomePhabricator

[lib] Discard keyserver usernames for joinThreadActionTypes and newThreadActionTypes
ClosedPublic

Authored by inka on Jun 7 2024, 8:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 10:33 AM
Unknown Object (File)
Tue, Dec 10, 3:13 AM
Unknown Object (File)
Thu, Nov 28, 9:07 PM
Unknown Object (File)
Thu, Nov 28, 7:06 PM
Unknown Object (File)
Thu, Nov 28, 6:07 PM
Unknown Object (File)
Thu, Nov 28, 1:07 PM
Unknown Object (File)
Sun, Nov 24, 9:43 AM
Unknown Object (File)
Nov 20 2024, 10:21 AM
Subscribers

Details

Summary

issue: ENG-8365
We want the username to be fetched from identity. This is handled by UserInfosHandler, which checks if there are any user infos with null username

Test Plan

Joined a community, checked that user infos for new users had a null id, and for user the user already knew the username was unchanged.
Checked that after a while the usernames were fetched from identity

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Jun 7 2024, 8:56 AM
lib/reducers/user-reducer.js
204–220 ↗(On Diff #41109)

Does Flow not like this?

This revision is now accepted and ready to land.Jun 10 2024, 3:15 AM
inka planned changes to this revision.Jun 20 2024, 6:55 AM

I should exclude commbot, because it doesn't exist on the staging identity....

Don't remove commbot username. I didn't do it for all bots, because Object.entries(bots) is mixed, so there is no easy way to get the id. Also commbot is our only bot, so I don't think this is worth spending time on now

This revision is now accepted and ready to land.Jun 21 2024, 12:08 AM
lib/reducers/user-reducer.js
234–250

We should be able to simplify this to have a const result similar to my original comment by just determining username at the top

Also I think the first spread of newUserInfos[id] doesn't need to happen – can't we just assign [id]: newUserInfos[id] directly?

234–250

It's probably not worth submitting a whole new diff for this though