feat: Add an SDK method for opening conversation in popout window (#4232)
This commit is contained in:
parent
0ba6e772a4
commit
30ac8054ba
4 changed files with 45 additions and 11 deletions
|
@ -31,6 +31,7 @@ import {
|
|||
initOnEvents,
|
||||
} from 'shared/helpers/AudioNotificationHelper';
|
||||
import { isFlatWidgetStyle } from './settingsHelper';
|
||||
import { popoutChatWindow } from '../widget/helpers/popoutHelper';
|
||||
|
||||
export const IFrameHelper = {
|
||||
getUrl({ baseUrl, websiteToken }) {
|
||||
|
@ -190,6 +191,12 @@ export const IFrameHelper = {
|
|||
onBubbleClick(bubbleState);
|
||||
},
|
||||
|
||||
popoutChatWindow: ({ baseUrl, websiteToken, locale }) => {
|
||||
const cwCookie = Cookies.get('cw_conversation');
|
||||
window.$chatwoot.toggle('close');
|
||||
popoutChatWindow(baseUrl, websiteToken, locale, cwCookie);
|
||||
},
|
||||
|
||||
closeWindow: () => {
|
||||
onBubbleClick({ toggleValue: false });
|
||||
removeUnreadClass();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue