diff --git a/client/src/components/chat-popup/chat-popup.component.jsx b/client/src/components/chat-popup/chat-popup.component.jsx index 7c0711fbc..443dfde3e 100644 --- a/client/src/components/chat-popup/chat-popup.component.jsx +++ b/client/src/components/chat-popup/chat-popup.component.jsx @@ -108,7 +108,7 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh refetch()} /> - {pollInterval > 0 && {t("messaging.labels.nopush")}} + {!socket?.connected && {t("messaging.labels.nopush")}} toggleChatVisible()} diff --git a/package-lock.json b/package-lock.json index 3b2b05a1c..6d1d243cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ "soap": "^1.1.6", "socket.io": "^4.8.1", "socket.io-adapter": "^2.5.5", - "ssh2-sftp-client": "^10.0.3", + "ssh2-sftp-client": "^11.0.0", "twilio": "^4.23.0", "uuid": "^10.0.0", "winston": "^3.17.0", @@ -66,6 +66,7 @@ "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", "concurrently": "^8.2.2", + "p-limit": "^3.1.0", "prettier": "^3.3.3", "source-map-explorer": "^2.5.2" }, @@ -6707,8 +6708,8 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -7737,16 +7738,17 @@ } }, "node_modules/ssh2-sftp-client": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/ssh2-sftp-client/-/ssh2-sftp-client-10.0.3.tgz", - "integrity": "sha512-Wlhasz/OCgrlqC8IlBZhF19Uw/X/dHI8ug4sFQybPE+0sDztvgvDf7Om6o7LbRLe68E7XkFZf3qMnqAvqn1vkQ==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/ssh2-sftp-client/-/ssh2-sftp-client-11.0.0.tgz", + "integrity": "sha512-lOjgNYtioYquhtgyHwPryFNhllkuENjvCKkUXo18w/Q4UpEffCnEUBfiOTlwFdKIhG1rhrOGnA6DeKPSF2CP6w==", + "license": "Apache-2.0", "dependencies": { "concat-stream": "^2.0.0", "promise-retry": "^2.0.1", "ssh2": "^1.15.0" }, "engines": { - "node": ">=16.20.2" + "node": ">=18.20.4" }, "funding": { "type": "individual", @@ -8691,8 +8693,8 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "devOptional": true, "license": "MIT", - "optional": true, "engines": { "node": ">=10" }, diff --git a/server/utils/statusReporter.js b/server/utils/statusReporter.js index a2e9bdc26..9a1dec6b4 100644 --- a/server/utils/statusReporter.js +++ b/server/utils/statusReporter.js @@ -26,7 +26,7 @@ function StartStatusReporter() { } try { - const crispStatusReporter = new CrispStatusReporter({ + return new CrispStatusReporter({ token: process.env.CRISP_SECRET_TOKEN, // Your reporter token (given by Crisp) service_id: process.env.CRISP_SERVICE_IDENTIFIER, // Service ID containing the parent Node for Replica (given by Crisp) node_id: process.env.CRISP_NODE_IDENTIFIER, // Node ID containing Replica (given by Crisp) @@ -34,14 +34,28 @@ function StartStatusReporter() { interval: 30, // Reporting interval (in seconds; defaults to 30 seconds if not set) console: { - debug: (log_message, data) => logger.log("crisp-status-update", "DEBUG", null, null, { log_message, data }), - log: (log_message, data) => logger.log("crisp-status-update", "DEBUG", null, null, { log_message, data }), - warn: (log_message, data) => logger.log("crisp-status-update", "WARN", null, null, { log_message, data }), - error: (log_message, data) => logger.log("crisp-status-update", "ERROR", null, null, { log_message, data }) + debug: (log_message, data) => + logger.log("crisp-status-update", "DEBUG", null, null, { + log_message, + data + }), + log: (log_message, data) => + logger.log("crisp-status-update", "DEBUG", null, null, { + log_message, + data + }), + warn: (log_message, data) => + logger.log("crisp-status-update", "WARN", null, null, { + log_message, + data + }), + error: (log_message, data) => + logger.log("crisp-status-update", "ERROR", null, null, { + log_message, + data + }) } // Console instance if you need to debug issues, }); - - return crispStatusReporter; } catch (error) { logger.log("crisp-status-update-error", "DEBUG", null, null, { error: error.message }); }