Page MenuHomePhabricator

[web] update ThreadAvatar component to pass farcaster channel ID to useResolvedThreadAvatar
ClosedPublic

Authored by varun on Oct 17 2024, 5:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 8:17 AM
Unknown Object (File)
Wed, Nov 20, 8:16 AM
Unknown Object (File)
Wed, Nov 20, 8:16 AM
Unknown Object (File)
Sun, Nov 17, 5:19 AM
Unknown Object (File)
Sun, Nov 10, 4:43 PM
Unknown Object (File)
Thu, Nov 7, 7:34 AM
Unknown Object (File)
Mon, Nov 4, 5:41 PM
Unknown Object (File)
Mon, Nov 4, 4:44 PM
Subscribers

Details

Summary

Depends on D13744

pass an object containing username/fid or an object containing a farcaster channel ID to useResolvedThreadAvatar

Test Plan

modified threads table in mariadb successfully set thread avatars for all threads in a tagged community to the fc channel image. was able to change child threads to other avatar types

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun held this revision as a draft.
varun published this revision for review.Oct 17 2024, 9:01 PM
varun added inline comments.
web/avatars/thread-avatar.react.js
67–72 ↗(On Diff #45253)

I think if there is a displayUserIDForThread and a communityInfo?.farcasterChannelID, the former should supersede the latter

web/avatars/thread-avatar.react.js
37 ↗(On Diff #45253)

btw, after re-reading the getCommunity code, it seems like it gives us what we want. we were concerned that it would only work for child threads in a community but it returns the community for the community root thread as well, I believe. tested this, too

ashoat added inline comments.
web/avatars/thread-avatar.react.js
37 ↗(On Diff #45253)

I think I got confused because its input is named parentThreadInfo. Should that just be renamed to threadInfo?

67–72 ↗(On Diff #45253)

Left feedback in D13744, but I think it would be better to pass both in

This revision is now accepted and ready to land.Oct 20 2024, 11:36 AM
web/avatars/thread-avatar.react.js
37 ↗(On Diff #45253)