Page MenuHomePhabricator

[keyserver] Update `fetchServerThreadInfos` to include `avatar` field
ClosedPublic

Authored by atul on Apr 6 2023, 12:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 9:59 AM
Unknown Object (File)
Fri, Nov 8, 9:59 AM
Unknown Object (File)
Fri, Nov 8, 9:59 AM
Unknown Object (File)
Tue, Nov 5, 10:05 PM
Unknown Object (File)
Tue, Nov 5, 10:05 PM
Unknown Object (File)
Tue, Nov 5, 2:31 AM
Unknown Object (File)
Tue, Nov 5, 2:30 AM
Unknown Object (File)
Tue, Nov 5, 2:30 AM
Subscribers

Details

Summary

Modify fetchServerThreadInfos to include avatar (if it exists) in response from fetchServerThreadInfos query.


Depends on D7332

Test Plan

Set breakpoints and verified that avatar field was included in constructed object:

805340.png (1×2 px, 324 KB)

Verified that Redux state was updated to include avatar field (as result of updateThread => commitMembershipChangeset => rawThreadInfosFromServerThreadInfos => createUpdates):

670fbd.png (802×1 px, 122 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Apr 6 2023, 12:17 PM
ashoat added inline comments.
lib/types/thread-types.js
282 ↗(On Diff #24743)

Is the second question mark necessary here? It seems to me like if the avatar property exists, it will not be falsey (but I might be missing something)

(I guess the other types have the second question mark, and it doesn't really affect much)

Separately, it might be a good idea to place it in the same place where it is in the other types (after name)

This revision is now accepted and ready to land.Apr 6 2023, 12:40 PM
lib/types/thread-types.js
282 ↗(On Diff #24743)

No second question mark isn't necessary. After thinking through old clients we concluded that avatar should either be
A. truthy AvatarDBContent
B. excluded from *ThreadInfo/*UserInfo altogether

Will remove here before landing, and reconsider the other instances of ?AvatarDBContent.


Good point, will reposition before landing.

atul edited the test plan for this revision. (Show Details)

address feedback

resolve merge conflict and land

This revision was landed with ongoing or failed builds.Apr 6 2023, 3:34 PM
This revision was automatically updated to reflect the committed changes.