Page MenuHomePhabricator

[keyserver] Introduce `updateUserAvatar` updater and use in `updateUserAvatarResponder`
ClosedPublic

Authored by atul on Mar 22 2023, 11:19 PM.
Tags
None
Referenced Files
F3383988: D7152.id24049.diff
Thu, Nov 28, 6:48 PM
F3383783: D7152.id24050.diff
Thu, Nov 28, 5:43 PM
F3383459: D7152.diff
Thu, Nov 28, 3:46 PM
Unknown Object (File)
Mon, Nov 4, 11:19 PM
Unknown Object (File)
Mon, Nov 4, 11:19 PM
Unknown Object (File)
Mon, Nov 4, 11:18 PM
Unknown Object (File)
Mon, Nov 4, 11:18 PM
Unknown Object (File)
Mon, Nov 4, 11:18 PM
Subscribers

Details

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)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable