diff --git a/native/avatars/thread-avatar.react.js b/native/avatars/thread-avatar.react.js --- a/native/avatars/thread-avatar.react.js +++ b/native/avatars/thread-avatar.react.js @@ -4,8 +4,9 @@ import { useAvatarForThread } from 'lib/hooks/avatar-hooks.js'; import { useResolvedThreadAvatar } from 'lib/shared/avatar-utils.js'; -import { getSingleOtherUser } from 'lib/shared/thread-utils.js'; +import { getSingleOtherUser, getCommunity } from 'lib/shared/thread-utils.js'; import type { AvatarSize } from 'lib/types/avatar-types.js'; +import type { CommunityInfo } from 'lib/types/community-types.js'; import type { ThreadInfo, ResolvedThreadInfo, @@ -33,6 +34,14 @@ state => state.currentUserInfo && state.currentUserInfo.id, ); + const communityID = getCommunity(threadInfo); + const communityInfo: ?CommunityInfo = useSelector(state => { + if (!communityID) { + return null; + } + return state.communityStore.communityInfos[communityID]; + }); + let displayUserIDForThread; if (threadTypeIsPrivate(threadInfo.type)) { displayUserIDForThread = viewerID; @@ -57,7 +66,7 @@ const resolvedThreadAvatar = useResolvedThreadAvatar(avatarInfo, { userProfileInfo: displayUser, - channelInfo: { fcChannelID: null }, + channelInfo: { fcChannelID: communityInfo?.farcasterChannelID }, }); return ;