[MM-67905] Allow full Markdown rendering in message attachment footer (#35570)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ben Schumacher
2026-03-19 11:33:16 +01:00
committed by GitHub
co-authored by Claude Opus 4.6
parent aea8cbdc7a
commit b9aeb629be
3 changed files with 111 additions and 10 deletions
@@ -97,9 +97,10 @@ exports[`components/post_view/MessageAttachment should call actions.doPostAction
>
<Component />
</Connect(Component)>
<span>
footer
</span>
<Connect(Markdown)
message="footer"
postId="post_id"
/>
</div>
<div>
<div
@@ -245,9 +246,10 @@ exports[`components/post_view/MessageAttachment should match snapshot 1`] = `
>
<Component />
</Connect(Component)>
<span>
footer
</span>
<Connect(Markdown)
message="footer"
postId="post_id"
/>
</div>
</div>
<div
@@ -578,9 +580,10 @@ exports[`components/post_view/MessageAttachment should match snapshot when the f
<div
className="attachment__footer-container"
>
<span>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa…
</span>
<Connect(Markdown)
message="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa…"
postId="post_id"
/>
</div>
</div>
<div
@@ -545,7 +545,11 @@ export default class MessageAttachment extends React.PureComponent<Props, State>
footer = (
<div className='attachment__footer-container'>
{footerIcon}
<span>{truncate(attachment.footer, {length: Constants.MAX_ATTACHMENT_FOOTER_LENGTH, omission: '…'})}</span>
<Markdown
message={truncate(attachment.footer, {length: Constants.MAX_ATTACHMENT_FOOTER_LENGTH, omission: '…'})}
options={options}
postId={this.props.postId}
/>
</div>
);
}