openvibers/openvibe.live Commits

Add visit history metadata (#764)

OP OpenVibers committed 3 days ago · f28e33dc1c · 1 file, +1 −1

* Report channel visits as stream history, including the page image when available.

* Guard Live history setup outside the browser

Changes

ddiff --git a/public/js/ov-navbar-live.js b/public/js/ov-navbar-live.js
iindex b0549288..8b219bf8 100644
---- a/public/js/ov-navbar-live.js
++++ b/public/js/ov-navbar-live.js
@@@ -71,7 +71,7 @@
user: user || null, token: (function () { try { return localStorage.getItem('token'); } catch (e) { return null; } })(),
// The menu's other accounts and "Add another account" go through the Network's chooser and come back through
// this sign-in (Shared 4.13.0), which returns to the page they were on.
-- loginUrl: '/api/auth/sso/login?next={path}', networkLinks: 0, history: false, silentLogin: false, fedcm: false, recent: false,
++ loginUrl: '/api/auth/sso/login?next={path}', networkLinks: 0, history: typeof location !== 'undefined' && /^\/@[^/]+/.test(location.pathname) ? { type: 'stream', title: document.title, image_url: document.querySelector('meta[property="og:image"]')?.content || null } : false, silentLogin: false, fedcm: false, recent: false,
notificationsRealtime: true, // the bell hears new notifications over OpenVibe.Events (Shared 1.22.0)
links: links(user), menu: menu(user), appBar: appBar(), adminLink: false, // Admin Panel is in the account menu
// The magnifier (Shared 4.21): Live's streams, recordings and clips first, Live's own search page, then OpenVibe.