Page MenuHomePhabricator

[keyserver] Send `updateTypes.UPDATE_CURRENT_USER` to currentUser on `updateUserAvatar`
ClosedPublic

Authored by atul on Apr 28 2023, 11:23 AM.
Tags
None
Referenced Files
F5352244: D7682.diff
Wed, Apr 9, 7:00 AM
F5338148: D7682.id.diff
Wed, Apr 9, 1:06 AM
F5336131: D7682.diff
Wed, Apr 9, 12:05 AM
F5334502: D7682.id25968.diff
Tue, Apr 8, 10:54 PM
F5331627: D7682.id25918.diff
Tue, Apr 8, 9:49 PM
F5331031: D7682.id25921.diff
Tue, Apr 8, 9:38 PM
F5330300: D7682.id25970.diff
Tue, Apr 8, 9:24 PM
F5329879: D7682.id25923.diff
Tue, Apr 8, 9:16 PM
Subscribers

Details

Summary

Because we're using updatesForCurrentSession: 'return' these updates will NOT be sent for current session. This is for other sessions where the user might be logged in.

Test Plan

Works as expected:

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested review of this revision.Apr 28 2023, 11:40 AM
keyserver/src/updaters/account-updaters.js
210 ↗(On Diff #25918)

Nit: can we make this the first param? Usually we have Viewer as the first param (unless it's optional)

213–215 ↗(On Diff #25918)

Let's not filter the current viewer. That way we'll get the update via updatesForCurrentSession: 'return', and return to the client directly

231 ↗(On Diff #25918)

Let's just have a single createUpdates, with the full array and the ViewerInfo in this invocation here

keyserver/src/updaters/account-updaters.js
228–231 ↗(On Diff #25921)

In subsequent diff will return and consume in updateUserAvatar to include updates in return value after updating payload

ashoat added inline comments.
keyserver/src/updaters/account-updaters.js
228

I assume returning the result here is left to a subsequent diff?

This revision is now accepted and ready to land.Apr 28 2023, 1:59 PM
keyserver/src/updaters/account-updaters.js
228

Yup

This revision was landed with ongoing or failed builds.May 1 2023, 11:08 AM
This revision was automatically updated to reflect the committed changes.