Disable forward for messages with embedded contact

This commit is contained in:
Scott Nonnenberg 2022-04-11 13:57:44 -07:00 committed by GitHub
parent 6d816d01ad
commit 7f89f6162f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 442 additions and 185 deletions

View file

@ -48,6 +48,7 @@ const useProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
doForwardMessage: action('doForwardMessage'),
getPreferredBadge: () => undefined,
i18n,
hasContact: Boolean(overrideProps.hasContact),
isSticker: Boolean(overrideProps.isSticker),
linkPreview: overrideProps.linkPreview,
messageBody: text('messageBody', overrideProps.messageBody || ''),
@ -75,6 +76,10 @@ story.add('a sticker', () => {
return <ForwardMessageModal {...useProps({ isSticker: true })} />;
});
story.add('with a contact', () => {
return <ForwardMessageModal {...useProps({ hasContact: true })} />;
});
story.add('link preview', () => {
return (
<ForwardMessageModal