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
Unknown Object (File)
Mon, Nov 25, 8:55 PM
Unknown Object (File)
Mon, Nov 25, 8:55 PM
Unknown Object (File)
Mon, Nov 25, 8:55 PM
Unknown Object (File)
Mon, Nov 25, 8:55 PM
Unknown Object (File)
Mon, Nov 25, 8:55 PM
Unknown Object (File)
Sun, Nov 24, 9:23 PM
Unknown Object (File)
Sun, Nov 24, 9:01 PM
Unknown Object (File)
Sun, Nov 24, 8:57 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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

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

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.