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
Unknown Object (File)
Fri, May 3, 6:58 AM
Unknown Object (File)
Thu, May 2, 4:57 PM
Unknown Object (File)
Thu, May 2, 3:55 AM
Unknown Object (File)
Wed, May 1, 5:40 PM
Unknown Object (File)
Mon, Apr 29, 5:41 AM
Unknown Object (File)
Sun, Apr 14, 8:14 PM
Unknown Object (File)
Sun, Apr 14, 8:14 PM
Unknown Object (File)
Sun, Apr 14, 8:14 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