feat: Custom fields in pre-chat form (#4189)

This commit is contained in:
Muhsin Keloth
2022-04-19 12:47:29 +05:30
committed by GitHub
parent 1ccd29140d
commit 26f23a6e21
25 changed files with 824 additions and 160 deletions

View File

@@ -151,10 +151,7 @@ export default {
},
registerCampaignEvents() {
bus.$on(ON_CAMPAIGN_MESSAGE_CLICK, () => {
const showPreChatForm =
this.preChatFormEnabled && this.preChatFormOptions.requireEmail;
const isUserEmailAvailable = !!this.currentUser.email;
if (showPreChatForm && !isUserEmailAvailable) {
if (this.shouldShowPreChatForm) {
this.replaceRoute('prechat-form');
} else {
this.replaceRoute('messages');