From d4bf34b036c913ba2617391b43c1a39a7060a3c3 Mon Sep 17 00:00:00 2001 From: Claudio Promptoso Date: Thu, 20 Aug 2026 19:58:39 +0000 Subject: [PATCH 1/2] chore(deps): bump bigbluebutton-html-plugin-sdk to 0.1.26 (BigBlueButton 4.0) Pin the build to the SDK that BigBlueButton 4.0 currently ships (0.1.26) and widen requiredSdkVersion to ^0.1.2, so the plugin also loads on 4.0 servers running an earlier 0.1.x SDK instead of being rejected at load time. Co-Authored-By: Guilherme Leme --- manifest.json | 2 +- package-lock.json | 15 ++++++++------- package.json | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/manifest.json b/manifest.json index fd881a4..6c6ac6f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "requiredSdkVersion": "~0.0.59", + "requiredSdkVersion": "^0.1.2", "name": "CodeHighlight", "version": "0.0.1", "javascriptEntrypointUrl": "BbbPluginCodeHighlight.js", diff --git a/package-lock.json b/package-lock.json index 09f0b14..253bd26 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@types/react": "^18.2.13", "@types/react-dom": "^18.2.6", "babel-plugin-syntax-dynamic-import": "^6.18.0", - "bigbluebutton-html-plugin-sdk": "0.0.66", + "bigbluebutton-html-plugin-sdk": "0.1.26", "highlight.js": "^11.11.1", "highlightjs-copy": "^1.0.5", "path": "^0.12.7", @@ -3453,9 +3453,10 @@ "dev": true }, "node_modules/bigbluebutton-html-plugin-sdk": { - "version": "0.0.66", - "resolved": "https://registry.npmjs.org/bigbluebutton-html-plugin-sdk/-/bigbluebutton-html-plugin-sdk-0.0.66.tgz", - "integrity": "sha512-cjwq4N5EKB177bB910Jw6+QP/NN5bdZXxV16rNfpz3B28/NTMQ5of2x62TA7LEdJcM3KZNxFE5Caxhx9cpibmQ==", + "version": "0.1.26", + "resolved": "https://registry.npmjs.org/bigbluebutton-html-plugin-sdk/-/bigbluebutton-html-plugin-sdk-0.1.26.tgz", + "integrity": "sha512-EANOpZiIPsm69npnQf20r6ymhjyQAr8p3zjHyyPHwm7avFtDUt/5kkVBzDBq7emHr4WSYCDrVOxphqCywxC+eg==", + "license": "LGPL-3.0", "dependencies": { "@apollo/client": "^3.8.7", "@browser-bunyan/console-formatted-stream": "^1.8.0", @@ -12172,9 +12173,9 @@ "dev": true }, "bigbluebutton-html-plugin-sdk": { - "version": "0.0.66", - "resolved": "https://registry.npmjs.org/bigbluebutton-html-plugin-sdk/-/bigbluebutton-html-plugin-sdk-0.0.66.tgz", - "integrity": "sha512-cjwq4N5EKB177bB910Jw6+QP/NN5bdZXxV16rNfpz3B28/NTMQ5of2x62TA7LEdJcM3KZNxFE5Caxhx9cpibmQ==", + "version": "0.1.26", + "resolved": "https://registry.npmjs.org/bigbluebutton-html-plugin-sdk/-/bigbluebutton-html-plugin-sdk-0.1.26.tgz", + "integrity": "sha512-EANOpZiIPsm69npnQf20r6ymhjyQAr8p3zjHyyPHwm7avFtDUt/5kkVBzDBq7emHr4WSYCDrVOxphqCywxC+eg==", "requires": { "@apollo/client": "^3.8.7", "@browser-bunyan/console-formatted-stream": "^1.8.0", diff --git a/package.json b/package.json index dee8b18..b81961f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@types/react": "^18.2.13", "@types/react-dom": "^18.2.6", "babel-plugin-syntax-dynamic-import": "^6.18.0", - "bigbluebutton-html-plugin-sdk": "0.0.66", + "bigbluebutton-html-plugin-sdk": "0.1.26", "highlight.js": "^11.11.1", "highlightjs-copy": "^1.0.5", "path": "^0.12.7", From e6af8e4fd41f914eaede99a31fe5fa1f589f8276 Mon Sep 17 00:00:00 2001 From: Claudio Promptoso Date: Fri, 21 Aug 2026 13:48:05 +0000 Subject: [PATCH 2/2] fix: guard against a null message body when filtering chat messages Soft deleted chat messages reach the plugin with a null message body, so calling search() on it throws. The throw is caught by the client global error boundary, which unmounts the plugin: after any chat message is deleted, no further code block is highlighted for the rest of the session. Optional chaining keeps those entries out of the filter. Co-Authored-By: Guilherme Leme --- src/code-highlighter/component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/code-highlighter/component.tsx b/src/code-highlighter/component.tsx index 6bd8fb8..abdff08 100644 --- a/src/code-highlighter/component.tsx +++ b/src/code-highlighter/component.tsx @@ -27,7 +27,7 @@ function CodeHighlighter({ pluginUuid: uuid }: CodeHighlighterProps): React.Reac useEffect(() => { if (responseLoadedChatMessage.data) { const messagesToHighlight = responseLoadedChatMessage.data.filter( - (message) => message.message.search(CODE_BLOCK_REGEX) !== -1, + (message) => message.message?.search(CODE_BLOCK_REGEX) > -1, ).map((message) => { const codeLanguageIndex = message.message.search(CODE_LANGUAGE_REGEX); let codeLanguage = '';