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)
Wed, Sep 25, 9:48 PM
Unknown Object (File)
Wed, Sep 25, 9:48 PM
Unknown Object (File)
Fri, Sep 20, 10:35 PM
Unknown Object (File)
Fri, Sep 20, 9:15 PM
Unknown Object (File)
Mon, Sep 16, 6:23 AM
Unknown Object (File)
Sat, Sep 14, 1:40 PM
Unknown Object (File)
Mon, Sep 9, 11:47 AM
Unknown Object (File)
Mon, Sep 9, 11:47 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
No Lint Coverage
Unit
No Test Coverage

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 ↗(On Diff #41686)

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 ↗(On Diff #41686)

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