[FIX] Make attachment validation compatible with web client
This commit is contained in:
parent
9a8047e64d
commit
f62dbca1f1
|
@ -15,13 +15,13 @@ const Attachments = React.memo(({
|
|||
}
|
||||
|
||||
return attachments.map((file, index) => {
|
||||
if (file.image_url) {
|
||||
if (file.type === 'file' && file.image_url) {
|
||||
return <Image key={file.image_url} file={file} showAttachment={showAttachment} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
||||
}
|
||||
if (file.audio_url) {
|
||||
if (file.type === 'file' && file.audio_url) {
|
||||
return <Audio key={file.audio_url} file={file} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
||||
}
|
||||
if (file.video_url) {
|
||||
if (file.type === 'file' && file.video_url) {
|
||||
return <Video key={file.video_url} file={file} showAttachment={showAttachment} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue