From 8906fd808df423def7427df5918e101ae0d0d81e Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Fri, 1 May 2020 23:00:33 +0530 Subject: [PATCH] Bug: Fix missing contact_id in conversation list (#798) --- .../routes/dashboard/conversation/ContactPanel.vue | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/javascript/dashboard/routes/dashboard/conversation/ContactPanel.vue b/app/javascript/dashboard/routes/dashboard/conversation/ContactPanel.vue index 355e815b4..d750eb8cd 100644 --- a/app/javascript/dashboard/routes/dashboard/conversation/ContactPanel.vue +++ b/app/javascript/dashboard/routes/dashboard/conversation/ContactPanel.vue @@ -146,7 +146,7 @@ export default { return `${platformName || ''} ${platformVersion || ''}`; }, contactId() { - return this.currentConversationMetaData.contact_id; + return this.currentConversationMetaData.contact?.id; }, contact() { return this.$store.getters['contacts/getContact'](this.contactId); @@ -155,16 +155,12 @@ export default { watch: { contactId(newContactId, prevContactId) { if (newContactId && newContactId !== prevContactId) { - this.$store.dispatch('contacts/show', { - id: this.currentConversationMetaData.contact_id, - }); + this.$store.dispatch('contacts/show', { id: newContactId }); } }, }, mounted() { - this.$store.dispatch('contacts/show', { - id: this.currentConversationMetaData.contact_id, - }); + this.$store.dispatch('contacts/show', { id: this.contactId }); }, methods: { onPanelToggle() {