HomePhabricator
Diffusion Comm b367a4710322

[keyserver] Fix `avatarUpdateQuery`

Description

[keyserver] Fix avatarUpdateQuery

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.

Reviewers: ashoat, ginsu

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D7435

Details

Provenance
atulAuthored on Apr 16 2023, 10:40 AM
Reviewer
ashoat
Differential Revision
D7435: [keyserver] Fix `avatarUpdateQuery`
Parents
rCOMMf3d78381cecc: [keyserver] Fix `updateUserAvatar` query
Branches
Unknown
Tags
Unknown