mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
feat: Create campaign conversation only if user interacts with the bubble (#2335)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
@@ -156,6 +156,16 @@ export const IFrameHelper = {
|
||||
}
|
||||
},
|
||||
|
||||
setCampaignMode: () => {
|
||||
const { isOpen } = window.$chatwoot;
|
||||
const toggleValue = true;
|
||||
if (!isOpen) {
|
||||
onBubbleClick({ toggleValue });
|
||||
const holderEl = document.querySelector('.woot-widget-holder');
|
||||
addClass(holderEl, 'has-unread-view');
|
||||
}
|
||||
},
|
||||
|
||||
resetUnreadMode: () => {
|
||||
IFrameHelper.sendMessage('unset-unread-view');
|
||||
IFrameHelper.events.removeUnreadClass();
|
||||
|
||||
Reference in New Issue
Block a user