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)
Sun, Apr 14, 8:14 PM
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:13 PM
Unknown Object (File)
Sun, Apr 14, 8:08 PM
Unknown Object (File)
Mar 7 2024, 5:57 AM
Unknown Object (File)
Mar 7 2024, 5:57 AM
Unknown Object (File)
Mar 7 2024, 5:57 AM
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
Branch
arcpatch-D7152 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage