feat: add support for unsupported

This commit is contained in:
Shivam Mishra
2024-12-05 17:37:50 +05:30
parent e7fddee4dc
commit 685cf56819
6 changed files with 52 additions and 1 deletions
@@ -22,6 +22,7 @@ import InstagramStoryBubble from './bubbles/InstagramStory.vue';
import AttachmentsBubble from './bubbles/Attachments.vue';
import EmailBubble from './bubbles/Email/Index.vue';
import LocationBubble from './bubbles/Location.vue';
import UnsupportedBubble from './bubbles/Unsupported.vue';
import MessageError from './MessageError.vue';
import MessageMeta from './MessageMeta.vue';
@@ -150,6 +151,8 @@ const variant = computed(() => {
}
}
if (props.status === MESSAGE_STATUS.FAILED) return MESSAGE_VARIANTS.ERROR;
if (props.contentAttributes.isUnsupported)
return MESSAGE_VARIANTS.UNSUPPORTED;
const variants = {
[MESSAGE_TYPES.INCOMING]: MESSAGE_VARIANTS.USER,
@@ -240,6 +243,10 @@ const componentToRender = computed(() => {
if (emailInboxTypes.includes(props.messageType)) return EmailBubble;
}
if (props.contentAttributes.isUnsupported) {
return UnsupportedBubble;
}
if (props.contentAttributes.imageType === 'story_mention') {
return InstagramStoryBubble;
}