HomePhabricator
Diffusion Comm 50260a36931b

[keyserver] Introduce `updateUserAvatar` updater and use in…

Tags
None
Referenced Files
F441307: 69044a.png
Mar 23 2023, 1:42 PM
File Not Attached
F441308: 36c12d.png
Mar 23 2023, 1:42 PM
File Not Attached
F441309: fd53c5.png
Mar 23 2023, 1:42 PM
File Not Attached
F441313: 16f6b9.png
Mar 23 2023, 1:42 PM
File Not Attached
Subscribers
None

Description

[keyserver] Introduce updateUserAvatar updater and use in updateUserAvatarResponder

Summary: updateUserAvatar sets the avatar column of the users table for a given viewer with the contents of the UpdateUserAvatarRequest we receive from updateUserAvatarResponder... unless we receive { +type: 'remove' }, in which case we set the avatar column to null.

Test Plan:
Use the following on native to send requests to keyserver:

16f6b9.png (534×1 px, 119 KB)

  1. Observe that avatar column is empty for user (atul-web):

fd53c5.png (232×1 px, 59 KB)

  1. Send request of type: 'emoji' and observe that column is populated:

36c12d.png (238×2 px, 70 KB)

  1. Send request of type: 'remove' and observe that column is empty again:

69044a.png (230×2 px, 64 KB)

Reviewers: ashoat, ginsu

Reviewed By: ginsu

Subscribers: tomek

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

Details

Provenance
atulAuthored on Mar 23 2023, 12:30 PM
Reviewer
ginsu
Differential Revision
D7152: [keyserver] Introduce `updateUserAvatar` updater and use in `updateUserAvatarResponder`
Parents
rCOMM3a1e14753e51: Revert "[web] render avatar in account screen"
Branches
Unknown
Tags
Unknown