Fix: Hide prechat for sessions inititated with setUser (#1914)

This commit is contained in:
Nithin David Thomas 2021-03-20 17:44:20 +05:30 committed by GitHub
parent 484c32fae3
commit 3043ee5058
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 105 additions and 6 deletions

View file

@ -114,13 +114,15 @@ export default {
conversationSize: 'conversation/getConversationSize',
groupedMessages: 'conversation/getGroupedConversation',
isFetchingList: 'conversation/getIsFetchingList',
currentUser: 'contacts/getCurrentUser',
}),
currentView() {
const { email: currentUserEmail = '' } = this.currentUser;
if (this.isHeaderCollapsed) {
if (this.conversationSize) {
return 'messageView';
}
if (this.preChatFormEnabled) {
if (this.preChatFormEnabled && !currentUserEmail) {
return 'preChatFormView';
}
return 'messageView';