openvibers/openvibe.community Commits

AI paste footers are found after a CRLF blank line too (as Live writes them), so the 478 '@null's stream' footers are repaired (#118)

OP OpenVibers committed 22 days ago · f9a0c3061b · 2 files, +3 −1

Changes

ddiff --git a/server/pastes/no-looks.js b/server/pastes/no-looks.js
iindex 31c7a6d..b3adde2 100644
---- a/server/pastes/no-looks.js
++++ b/server/pastes/no-looks.js
@@@ -16,7 +16,8 @@
*/
const { noLooks, noLooksTags } = require('openvibe-sdk/no-looks');
--const FOOTER = /(\n\n(?:🔴|▶)[\s\S]*)$/u;
++// Live writes the footer after a blank line, CRLF on every AI moment paste (2026-10-22: all 478 '@null' ones).
++const FOOTER = /(\r?\n\r?\n(?:🔴|▶)[\s\S]*)$/u;
const summary = (s) => (typeof s === 'string' ? noLooks(s).trim() : s);
ddiff --git a/test/pastes-no-looks.test.js b/test/pastes-no-looks.test.js
iindex cd42968..c5f4fa2 100644
---- a/test/pastes-no-looks.test.js
++++ b/test/pastes-no-looks.test.js
@@@ -80,6 +80,7 @@ const looks = require('../server/pastes/no-looks');
assert.strictEqual(looks.body('A person adjusts their hair.\n\n🔴 Caught live on @x\'s stream'), '🔴 Caught live on @x\'s stream', 'a description that was all looks leaves the footer');
assert.strictEqual(looks.body('A person adjusts their hair.'), '');
assert.strictEqual(looks.body("A desk.\n\n▶ Watch this moment on @null's stream: https://openvibe.video/v/9"), 'A desk.\n\n▶ Watch this moment on the stream: https://openvibe.video/v/9');
++ assert.strictEqual(looks.body("A man at a desk.\r\n\r\n▶ Watch this moment on @null's stream: https://openvibe.video/v/9"), 'A person at a desk.\r\n\r\n▶ Watch this moment on the stream: https://openvibe.video/v/9', 'CRLF, as Live writes it');
assert.strictEqual(looks.cleanRow({ origin: 'ai', title: 'A person adjusts their hair' }).title, 'Untitled');
});