fix: Disable pre-chat fields for identified users (#4234)
This commit is contained in:
parent
7b4cac746a
commit
715400f7ab
1 changed files with 5 additions and 1 deletions
|
@ -40,12 +40,16 @@ export default {
|
|||
availableAgents: 'agent/availableAgents',
|
||||
activeCampaign: 'campaign/getActiveCampaign',
|
||||
conversationSize: 'conversation/getConversationSize',
|
||||
currentUser: 'contacts/getCurrentUser',
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
startConversation() {
|
||||
const isUserEmailAvailable = !!this.currentUser.email;
|
||||
if (this.preChatFormEnabled && !this.conversationSize) {
|
||||
return this.replaceRoute('prechat-form');
|
||||
return this.replaceRoute('prechat-form', {
|
||||
disableContactFields: isUserEmailAvailable,
|
||||
});
|
||||
}
|
||||
return this.replaceRoute('messages');
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue