Skip to content

Commit 6b47679

Browse files
authored
RollBack referrall new conversation fixes (#132)
1 parent 3a9cfc3 commit 6b47679

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

app/javascript/widget/views/Home.vue

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
setCustomAttributes,
1818
} from 'widget/api/conversation';
1919
import TeamAvailability from 'widget/components/TeamAvailability';
20-
import { mapGetters, mapActions } from 'vuex';
20+
import { mapGetters } from 'vuex';
2121
import routerMixin from 'widget/mixins/routerMixin';
2222
export default {
2323
name: 'Home',
@@ -46,19 +46,12 @@ export default {
4646
}),
4747
},
4848
methods: {
49-
...mapActions('conversation', [
50-
'clearConversations',
51-
]),
52-
async startConversation() {
49+
startConversation() {
5350
const ref = new URLSearchParams(window.location.search).get('referral');
5451
if (ref) {
55-
try {
56-
await setCustomAttributes({"ref": ref});
57-
this.clearConversations();
58-
} catch (e) {
59-
// Ignore error
60-
}
61-
} else if (this.preChatFormEnabled && !this.conversationSize) {
52+
this.$store.dispatch('conversation/createConversation', {});
53+
}
54+
if (this.preChatFormEnabled && !this.conversationSize) {
6255
return this.replaceRoute('prechat-form');
6356
}
6457
return this.replaceRoute('messages');

0 commit comments

Comments
 (0)