From 1ba1e08d695e008d1d783aeb823f9e9e500da896 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 28 Mar 2024 11:16:33 +0100 Subject: [PATCH] debug _converse on dev env --- conversejs/lib/plugins/livechat-specific.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conversejs/lib/plugins/livechat-specific.ts b/conversejs/lib/plugins/livechat-specific.ts index 2a97ec57..d6adea6d 100644 --- a/conversejs/lib/plugins/livechat-specific.ts +++ b/conversejs/lib/plugins/livechat-specific.ts @@ -14,6 +14,11 @@ export const livechatSpecificsPlugin = { _converse.api.user.logout() window.converse.livechatDisconnect = undefined // will be set again on next initialize. } + + if (window.location.protocol === 'http:') { + // We are probably on a dev instance, so we will add _converse in window: + (window as any)._livechatConverse = _converse + } }, overrides: { ChatRoom: {