feat: Add Instagram Channel (#2955)
This commit is contained in:
parent
30244f79a6
commit
40d0b2faf3
30 changed files with 825 additions and 50 deletions
|
@ -6,7 +6,7 @@
|
|||
>
|
||||
<img
|
||||
v-if="channel.key === 'facebook'"
|
||||
src="~dashboard/assets/images/channels/facebook.png"
|
||||
src="~dashboard/assets/images/channels/messenger.png"
|
||||
/>
|
||||
<img
|
||||
v-if="channel.key === 'twitter'"
|
||||
|
|
|
@ -14,12 +14,19 @@
|
|||
color="white"
|
||||
:size="avatarSize"
|
||||
/>
|
||||
<img
|
||||
v-if="badge === 'instagram_direct_message'"
|
||||
id="badge"
|
||||
class="source-badge"
|
||||
:style="badgeStyle"
|
||||
src="~dashboard/assets/images/instagram_direct.png"
|
||||
/>
|
||||
<img
|
||||
v-if="badge === 'Channel::FacebookPage'"
|
||||
id="badge"
|
||||
class="source-badge"
|
||||
:style="badgeStyle"
|
||||
src="~dashboard/assets/images/fb-badge.png"
|
||||
src="~dashboard/assets/images/messenger_direct.png"
|
||||
/>
|
||||
<img
|
||||
v-if="badge === 'twitter-tweet'"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<thumbnail
|
||||
v-if="!hideThumbnail"
|
||||
:src="currentContact.thumbnail"
|
||||
:badge="inboxBadge"
|
||||
:badge="chatBadge"
|
||||
class="columns"
|
||||
:username="currentContact.name"
|
||||
:status="currentContact.availability_status"
|
||||
|
@ -119,6 +119,10 @@ export default {
|
|||
accountId: 'getCurrentAccountId',
|
||||
}),
|
||||
|
||||
chatExtraAttributes() {
|
||||
return this.chat.additional_attributes;
|
||||
},
|
||||
|
||||
chatMetadata() {
|
||||
return this.chat.meta || {};
|
||||
},
|
||||
|
@ -127,6 +131,14 @@ export default {
|
|||
return this.chatMetadata.assignee || {};
|
||||
},
|
||||
|
||||
chatBadge() {
|
||||
if(this.chatExtraAttributes['type']){
|
||||
return this.chatExtraAttributes['type']
|
||||
} else {
|
||||
return this.chatMetadata.channel
|
||||
}
|
||||
},
|
||||
|
||||
currentContact() {
|
||||
return this.$store.getters['contacts/getContact'](
|
||||
this.chatMetadata.sender.id
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<Thumbnail
|
||||
:src="currentContact.thumbnail"
|
||||
size="40px"
|
||||
:badge="inboxBadge"
|
||||
:badge="chatBadge"
|
||||
:username="currentContact.name"
|
||||
:status="currentContact.availability_status"
|
||||
/>
|
||||
|
@ -73,9 +73,23 @@ export default {
|
|||
uiFlags: 'inboxAssignableAgents/getUIFlags',
|
||||
currentChat: 'getSelectedChat',
|
||||
}),
|
||||
|
||||
chatExtraAttributes() {
|
||||
return this.chat.additional_attributes;
|
||||
},
|
||||
|
||||
chatMetadata() {
|
||||
return this.chat.meta;
|
||||
},
|
||||
|
||||
chatBadge() {
|
||||
if(this.chatExtraAttributes['type']){
|
||||
return this.chatExtraAttributes['type']
|
||||
} else {
|
||||
return this.chatMetadata.channel
|
||||
}
|
||||
},
|
||||
|
||||
currentContact() {
|
||||
return this.$store.getters['contacts/getContact'](
|
||||
this.chat.meta.sender.id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue