Skip to content

Commit 11c47bc

Browse files
fix: quote image not loading (#6698)
* fix: quote image not loading * chore: snapshot tests
1 parent ff05e91 commit 11c47bc

File tree

5 files changed

+1343
-3
lines changed

5 files changed

+1343
-3
lines changed

app/containers/message/Components/Attachments/Quote.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { getMessageFromAttachment } from '../../utils';
1111
const isQuoteAttachment = (file?: IAttachment): boolean => {
1212
if (!file) return false;
1313

14-
if (file.image_url || file.audio_url || file.video_url || file.collapsed) {
14+
if (!file.color && !file.text && (file.image_url || file.audio_url || file.video_url || file.collapsed)) {
1515
return false;
1616
}
1717

app/containers/message/Message.stories.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,3 +2017,17 @@ export const CollapsedAttachmentsLargeFont = () => (
20172017
<MessageLargeFont msg='Message' attachments={[{ ...collapsedAttachments, collapsed: false }]} />
20182018
</>
20192019
);
2020+
2021+
const attachmentWithTextAndLink = [
2022+
{
2023+
title: 'Rocket.Chat',
2024+
title_link: 'https://rocket.chat',
2025+
text: 'Rocket.Chat, the best open source chat',
2026+
image_url: 'https://rc.jena.de/images/integration-attachment-example.png',
2027+
color: '#764FA5'
2028+
}
2029+
];
2030+
2031+
export const AttachmentWithTextAndLink = () => <Message attachments={attachmentWithTextAndLink} />;
2032+
2033+
export const AttachmentWithTextAndLinkLargeFont = () => <MessageLargeFont attachments={attachmentWithTextAndLink} />;

0 commit comments

Comments
 (0)