mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
fix: Campaign message is hiding the conversation view after opening the widget (#2428)
* Fix the widget triggered- campain collision * fix spelling mistakes
This commit is contained in:
@@ -33,6 +33,7 @@ export default {
|
||||
hideMessageBubble: false,
|
||||
widgetPosition: 'right',
|
||||
showPopoutButton: false,
|
||||
isWebWidgetTriggered: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -137,7 +138,9 @@ export default {
|
||||
setCampaignView() {
|
||||
const { messageCount, activeCampaign } = this;
|
||||
const isCampaignReadyToExecute =
|
||||
!isEmptyObject(activeCampaign) && !messageCount;
|
||||
!isEmptyObject(activeCampaign) &&
|
||||
!messageCount &&
|
||||
!this.isWebWidgetTriggered;
|
||||
if (this.isIFrame && isCampaignReadyToExecute) {
|
||||
this.showCampaignView = true;
|
||||
IFrameHelper.sendMessage({
|
||||
@@ -162,7 +165,11 @@ export default {
|
||||
createWidgetEvents(message) {
|
||||
const { eventName } = message;
|
||||
const isWidgetTriggerEvent = eventName === 'webwidget.triggered';
|
||||
if (isWidgetTriggerEvent && this.showUnreadView) {
|
||||
this.isWebWidgetTriggered = true;
|
||||
if (
|
||||
isWidgetTriggerEvent &&
|
||||
(this.showUnreadView || this.showCampaignView)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
this.setUserLastSeen();
|
||||
|
||||
Reference in New Issue
Block a user