From e1cad6e20a296da4bb8e27e2feedbb6b13a42d1d Mon Sep 17 00:00:00 2001 From: Nuzhy-Deriv Date: Tue, 22 Oct 2024 11:34:37 +0800 Subject: [PATCH] fix: get server url, appId from the application --- public/scripts/freshchat-temp.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/public/scripts/freshchat-temp.js b/public/scripts/freshchat-temp.js index baf4e2d1f228a..c417f8c01ff9b 100644 --- a/public/scripts/freshchat-temp.js +++ b/public/scripts/freshchat-temp.js @@ -1,10 +1,9 @@ class FreshChat { - hostname = localStorage.getItem("config.server_url"); - appId = localStorage.getItem("config.app_id"); - - constructor({ token = null, hideButton = false } = {}) { + constructor({ token = null, hideButton = false, serverUrl, appId } = {}) { this.authToken = token; this.hideButton = hideButton; + this.hostname = serverUrl; + this.appId = appId; this.init(); }