diff --git a/ts/components/conversation/MessageDetail.stories.tsx b/ts/components/conversation/MessageDetail.stories.tsx index 187869503922..f700f4309c2e 100644 --- a/ts/components/conversation/MessageDetail.stories.tsx +++ b/ts/components/conversation/MessageDetail.stories.tsx @@ -69,7 +69,7 @@ const createProps = (overrideProps: Partial = {}): Props => ({ interactionMode: 'keyboard', theme: ThemeType.light, - showSafetyNumber: action('showSafetyNumber'), + toggleSafetyNumberModal: action('toggleSafetyNumberModal'), checkForAccount: action('checkForAccount'), clearSelectedMessage: action('clearSelectedMessage'), diff --git a/ts/components/conversation/MessageDetail.tsx b/ts/components/conversation/MessageDetail.tsx index 779986ac6222..aa6a3669a710 100644 --- a/ts/components/conversation/MessageDetail.tsx +++ b/ts/components/conversation/MessageDetail.tsx @@ -65,7 +65,6 @@ export type PropsData = { receivedAt: number; sentAt: number; - showSafetyNumber: (contactId: string) => void; i18n: LocalizerType; theme: ThemeType; getPreferredBadge: PreferredBadgeSelectorType; @@ -101,7 +100,9 @@ export type PropsReduxActions = Pick< | 'doubleCheckMissingQuoteReference' | 'checkForAccount' | 'viewStory' ->; +> & { + toggleSafetyNumberModal: (contactId: string) => void; +}; export type ExternalProps = PropsData & PropsBackboneActions; export type Props = PropsData & PropsBackboneActions & PropsReduxActions; @@ -162,7 +163,7 @@ export class MessageDetail extends React.Component { } public renderContact(contact: Contact): JSX.Element { - const { i18n, showSafetyNumber } = this.props; + const { i18n, toggleSafetyNumberModal } = this.props; const errors = contact.errors || []; const errorComponent = contact.isOutgoingKeyError ? ( @@ -170,7 +171,7 @@ export class MessageDetail extends React.Component { diff --git a/ts/components/conversation/SafetyNumberNotification.stories.tsx b/ts/components/conversation/SafetyNumberNotification.stories.tsx index efd4d70749c5..8cc15a15f96a 100644 --- a/ts/components/conversation/SafetyNumberNotification.stories.tsx +++ b/ts/components/conversation/SafetyNumberNotification.stories.tsx @@ -21,7 +21,7 @@ const createProps = (overrideProps: Partial = {}): Props => ({ i18n, contact: overrideProps.contact || ({} as ContactType), isGroup: boolean('isGroup', overrideProps.isGroup || false), - showIdentity: action('showIdentity'), + toggleSafetyNumberModal: action('toggleSafetyNumberModal'), }); export default { diff --git a/ts/components/conversation/SafetyNumberNotification.tsx b/ts/components/conversation/SafetyNumberNotification.tsx index cd6654fcafad..3c2325af29e1 100644 --- a/ts/components/conversation/SafetyNumberNotification.tsx +++ b/ts/components/conversation/SafetyNumberNotification.tsx @@ -24,7 +24,7 @@ type PropsHousekeeping = { }; export type PropsActions = { - showIdentity: (id: string) => void; + toggleSafetyNumberModal: (id: string) => void; }; export type Props = PropsData & PropsHousekeeping & PropsActions; @@ -33,7 +33,7 @@ export function SafetyNumberNotification({ contact, isGroup, i18n, - showIdentity, + toggleSafetyNumberModal, }: Props): JSX.Element { const changeKey = isGroup ? 'safetyNumberChangedGroup' @@ -62,7 +62,7 @@ export function SafetyNumberNotification({ button={