diff --git a/keyserver/src/fetchers/thread-fetchers.js b/keyserver/src/fetchers/thread-fetchers.js --- a/keyserver/src/fetchers/thread-fetchers.js +++ b/keyserver/src/fetchers/thread-fetchers.js @@ -309,6 +309,13 @@ native: 379, web: 130, }); + const canDisplayFarcasterThreadAvatars = hasMinCodeVersion( + viewer.platformDetails, + { + native: 405, + web: 122, + }, + ); const threadInfos: { [string]: LegacyThinRawThreadInfo | ThinRawThreadInfo, @@ -329,6 +336,7 @@ filterManageFarcasterChannelTagsPermission: manageFarcasterChannelTagsPermissionUnsupported, stripMemberPermissions: stripMemberPermissions, + canDisplayFarcasterThreadAvatars, }, ); if (threadInfo) { diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -757,6 +757,7 @@ +allowAddingUsersToCommunityRoot?: boolean, +filterManageFarcasterChannelTagsPermission?: boolean, +stripMemberPermissions?: boolean, + +canDisplayFarcasterThreadAvatars?: boolean, }; function rawThreadInfoFromServerThreadInfo( @@ -779,6 +780,8 @@ const filterManageFarcasterChannelTagsPermission = options?.filterManageFarcasterChannelTagsPermission; const stripMemberPermissions = options?.stripMemberPermissions; + const canDisplayFarcasterThreadAvatars = + options?.canDisplayFarcasterThreadAvatars; const filterThreadPermissions = ( innerThreadPermissions: ThreadPermissionsInfo, @@ -901,7 +904,12 @@ rawThreadInfo = { ...rawThreadInfo, sourceMessageID }; } if (serverThreadInfo.avatar) { - rawThreadInfo = { ...rawThreadInfo, avatar: serverThreadInfo.avatar }; + const avatar = + serverThreadInfo.avatar.type !== 'farcaster' || + canDisplayFarcasterThreadAvatars + ? serverThreadInfo.avatar + : null; + rawThreadInfo = { ...rawThreadInfo, avatar }; } if (!excludePinInfo) { rawThreadInfo = {