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)
Fri, Nov 15, 11:58 PM
Unknown Object (File)
Fri, Nov 15, 3:24 AM
Unknown Object (File)
Thu, Nov 14, 4:14 PM
Unknown Object (File)
Wed, Nov 13, 7:04 PM
Unknown Object (File)
Wed, Nov 13, 7:08 AM
Unknown Object (File)
Tue, Nov 12, 2:43 PM
Unknown Object (File)
Tue, Nov 12, 5:44 AM
Unknown Object (File)
Mon, Nov 11, 9:30 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
Branch
inka/userStore
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