feat: Render instagram reels in Chatwoot (#9829)

- Previously we were ignoring the reels shared over Instagram messages.
This PR will render the reels with in Chatwoot.

followup : we need to render reels in a better interface so that it is
clearly denoted to the user that its an Instagram reel
This commit is contained in:
Sojan Jose
2024-07-24 12:58:12 -07:00
committed by GitHub
parent 71073a06ff
commit 8e2b329202
7 changed files with 73 additions and 5 deletions

View File

@@ -40,6 +40,7 @@ const ALLOWED_FILE_TYPES = {
IMAGE: 'image',
VIDEO: 'video',
AUDIO: 'audio',
IG_REEL: 'ig_reel',
};
export default {
@@ -66,7 +67,10 @@ export default {
return this.attachment.file_type === ALLOWED_FILE_TYPES.IMAGE;
},
isVideo() {
return this.attachment.file_type === ALLOWED_FILE_TYPES.VIDEO;
return (
this.attachment.file_type === ALLOWED_FILE_TYPES.VIDEO ||
this.attachment.file_type === ALLOWED_FILE_TYPES.IG_REEL
);
},
isAudio() {
return this.attachment.file_type === ALLOWED_FILE_TYPES.AUDIO;