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(). *