diff --git a/ts/components/conversation/ConversationHeader.stories.tsx b/ts/components/conversation/ConversationHeader.stories.tsx index 548fd00703..70c9173d6d 100644 --- a/ts/components/conversation/ConversationHeader.stories.tsx +++ b/ts/components/conversation/ConversationHeader.stories.tsx @@ -188,6 +188,19 @@ const stories: Array = [ muteExpiresAt: new Date('3000-10-18T11:11:11Z').valueOf(), }, }, + { + title: 'SMS-only conversation', + props: { + ...commonProps, + color: 'ultramarine', + title: '(202) 555-0006', + phoneNumber: '(202) 555-0006', + type: 'direct', + id: '6', + acceptedMessageRequest: true, + isSMSOnly: true, + }, + }, ], }, { diff --git a/ts/components/conversation/ConversationHeader.tsx b/ts/components/conversation/ConversationHeader.tsx index f095d09468..19eb80fd17 100644 --- a/ts/components/conversation/ConversationHeader.tsx +++ b/ts/components/conversation/ConversationHeader.tsx @@ -35,6 +35,7 @@ export type PropsDataType = { isMissingMandatoryProfileSharing?: boolean; outgoingCallButtonStyle: OutgoingCallButtonStyle; showBackButton?: boolean; + isSMSOnly?: boolean; } & Pick< ConversationType, | 'acceptedMessageRequest' @@ -570,7 +571,7 @@ export class ConversationHeader extends React.Component { } public render(): ReactNode { - const { id } = this.props; + const { id, isSMSOnly } = this.props; const { isNarrow } = this.state; const triggerId = `conversation-${id}`; @@ -593,7 +594,7 @@ export class ConversationHeader extends React.Component { > {this.renderBackButton()} {this.renderHeader()} - {this.renderOutgoingCallButtons()} + {!isSMSOnly && this.renderOutgoingCallButtons()} {this.renderSearchButton()} {this.renderMoreButton(triggerId)} {this.renderMenu(triggerId)} diff --git a/ts/state/smart/ConversationHeader.tsx b/ts/state/smart/ConversationHeader.tsx index ab8eae0021..6066149d7f 100644 --- a/ts/state/smart/ConversationHeader.tsx +++ b/ts/state/smart/ConversationHeader.tsx @@ -18,6 +18,7 @@ import { getActiveCall, isAnybodyElseInGroupCall } from '../ducks/calling'; import { getUserConversationId, getIntl } from '../selectors/user'; import { getOwn } from '../../util/getOwn'; import { missingCaseError } from '../../util/missingCaseError'; +import { isConversationSMSOnly } from '../../util/isConversationSMSOnly'; import { isGroupCallingEnabled } from '../../util/isGroupCallingEnabled'; export type OwnProps = { @@ -117,6 +118,7 @@ const mapStateToProps = (state: StateType, ownProps: OwnProps) => { conversation.messageCount && conversation.messageCount > 0 ), + isSMSOnly: isConversationSMSOnly(conversation), i18n: getIntl(state), showBackButton: state.conversations.selectedConversationPanelDepth > 0, outgoingCallButtonStyle: getOutgoingCallButtonStyle(conversation, state),