diff --git a/lib/shared/sidebar-utils.js b/lib/shared/sidebar-utils.js --- a/lib/shared/sidebar-utils.js +++ b/lib/shared/sidebar-utils.js @@ -20,7 +20,11 @@ } from '../types/message-types.js'; import type { ThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js'; import { threadPermissions } from '../types/thread-permission-types.js'; -import { threadTypes, threadTypeIsThick } from '../types/thread-types-enum.js'; +import { + threadTypes, + threadTypeIsThick, + threadTypeIsPersonal, +} from '../types/thread-types-enum.js'; import type { LoggedInUserInfo } from '../types/user-types.js'; import type { GetENSNames } from '../utils/ens-helpers.js'; import { @@ -76,11 +80,7 @@ } const singleOtherUser = getSingleOtherUser(parentThreadInfo, viewerID); - if ( - (parentThreadType === threadTypes.GENESIS_PERSONAL || - parentThreadType === threadTypes.PERSONAL) && - singleOtherUser - ) { + if (threadTypeIsPersonal(parentThreadType) && singleOtherUser) { const singleOtherUsername = parentThreadInfo.members.find( member => member.id === singleOtherUser, )?.username; diff --git a/native/chat/message-list.react.js b/native/chat/message-list.react.js --- a/native/chat/message-list.react.js +++ b/native/chat/message-list.react.js @@ -9,7 +9,7 @@ import { messageKey, useFetchMessages } from 'lib/shared/message-utils.js'; import { useWatchThread } from 'lib/shared/watch-thread-utils.js'; import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; -import { threadTypes } from 'lib/types/thread-types-enum.js'; +import { threadTypeIsPersonal } from 'lib/types/thread-types-enum.js'; import ChatList from './chat-list.react.js'; import type { ChatNavigationProp } from './chat.react.js'; @@ -197,10 +197,7 @@ const { messageListData, startReached } = this.props; const footer = startReached ? this.ListFooterComponent : undefined; let relationshipPrompt = null; - if ( - this.props.threadInfo.type === threadTypes.GENESIS_PERSONAL || - this.props.threadInfo.type === threadTypes.PERSONAL - ) { + if (threadTypeIsPersonal(this.props.threadInfo.type)) { relationshipPrompt = (