Page MenuHomePhabricator

[keyserver] Fix `avatarUpdateQuery`
ClosedPublic

Authored by atul on Apr 13 2023, 1:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 6:23 PM
Unknown Object (File)
Mon, Nov 25, 2:29 PM
Unknown Object (File)
Mon, Nov 25, 1:45 PM
Unknown Object (File)
Tue, Nov 5, 4:24 AM
Unknown Object (File)
Tue, Nov 5, 4:23 AM
Unknown Object (File)
Fri, Nov 1, 1:03 AM
Unknown Object (File)
Fri, Nov 1, 1:03 AM
Unknown Object (File)
Fri, Nov 1, 1:03 AM
Subscribers

Details

Summary

Just introduced this in D7430 and noticed a slight issue that left container column of an image avatar set until we set another image avatar.

Specifically, if we had an image avatar and switched to emoji avatar the container field of the previous image avatar upload would remain set.

This wouldn't cause any issues in practice (as things are now), but the state of the DB would not be "corrected" until we subsequently set an image avatar.

In order to fix this we adjust the logic to match what we have in the final UPDATE threads... query.

Test Plan
  1. Switch from image avatar to image avatar and ensure that contents of uploads table and threads table are correct.
  2. Switch from image avatar to emoji avatar and ensure that contents of uploads table and threads table are correct.

Diff Detail

Repository
rCOMM Comm
Branch
arcpatch-D7435 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul published this revision for review.Apr 13 2023, 2:01 PM
atul added inline comments.
keyserver/src/updaters/thread-updaters.js
664–666 ↗(On Diff #25143)

Got it right here...

This revision is now accepted and ready to land.Apr 14 2023, 6:44 AM
This revision was landed with ongoing or failed builds.Apr 16 2023, 10:48 AM
This revision was automatically updated to reflect the committed changes.