diff --git a/lib/permissions/farcaster-permissions.js b/lib/permissions/farcaster-permissions.js --- a/lib/permissions/farcaster-permissions.js +++ b/lib/permissions/farcaster-permissions.js @@ -79,9 +79,6 @@ [threadPermissions.VOICED]: true, [threadPermissions.REACT_TO_MESSAGE]: true, [threadPermissions.EDIT_MESSAGE]: true, - [threadPermissions.EDIT_THREAD_NAME]: true, - [threadPermissions.EDIT_THREAD_DESCRIPTION]: true, - [threadPermissions.EDIT_THREAD_AVATAR]: true, [threadPermissions.DELETE_OWN_MESSAGES]: true, }; return { diff --git a/lib/utils/create-farcaster-raw-thread-info.js b/lib/utils/create-farcaster-raw-thread-info.js --- a/lib/utils/create-farcaster-raw-thread-info.js +++ b/lib/utils/create-farcaster-raw-thread-info.js @@ -120,13 +120,26 @@ avatar = uri ? { type: 'image', uri } : null; } + let name = conversation.name; + let description = conversation.description; + if (!conversation.isGroup) { + // For a 1-1 conversation, follow the Farcaster approach and show user's + // name as the conversation name + const otherUserName = + conversation.viewerContext.counterParty?.displayName ?? + conversation.viewerContext.counterParty?.username ?? + 'anonymous'; + name = otherUserName; + description = `Your Direct Cast with ${otherUserName}`; + } + return { farcaster: true, id: threadID, type: threadType, - name: conversation.name, + name, avatar, - description: conversation.description, + description, color: generatePendingThreadColor(userIDs), parentThreadID: null, community: null,