From fad58ae362e02ee2d46052f3f703515b52f4aee9 Mon Sep 17 00:00:00 2001 From: Horatiu Muresan <39557534+horymury@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:11:59 +0200 Subject: [PATCH] feat(external-api) Expose meeting session (#14522) --- modules/API/API.js | 6 ++++++ modules/API/external/external_api.js | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/modules/API/API.js b/modules/API/API.js index d7e1d64d0d..6999e99aed 100644 --- a/modules/API/API.js +++ b/modules/API/API.js @@ -981,6 +981,12 @@ function initCommands() { callback(isP2pActive(APP.store.getState())); break; } + case 'session-id': { + const { conference } = APP.store.getState()['features/base/conference']; + + callback(conference?.getMeetingUniqueId() || ''); + break; + } case '_new_electron_screensharing_supported': { callback(true); break; diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js index ce98070218..0938cf9d24 100644 --- a/modules/API/external/external_api.js +++ b/modules/API/external/external_api.js @@ -1229,6 +1229,17 @@ export default class JitsiMeetExternalAPI extends EventEmitter { return this._numberOfParticipants; } + /** + * Return the conference`s sessionId. + * + * @returns {Promise} - Resolves with the conference`s sessionId. + */ + getSessionId() { + return this._transport.sendRequest({ + name: 'session-id' + }); + } + /** * Returns array of commands supported by executeCommand(). *