feat(external_api): Expose the Etherpad SharedDocument URL

This commit is contained in:
Damien Fetis
2025-03-09 21:21:42 +01:00
committed by GitHub
parent bca746cfc4
commit 481e8634e0
2 changed files with 17 additions and 0 deletions

6
modules/API/API.js Normal file → Executable file
View File

@@ -1050,6 +1050,12 @@ function initCommands() {
callback(getRoomsInfo(APP.store.getState()));
break;
}
case 'get-shared-document-url': {
const { etherpad } = APP.store.getState()['features/etherpad'];
callback(etherpad?.documentUrl || '');
break;
}
case 'get-p2p-status': {
callback(isP2pActive(APP.store.getState()));
break;

View File

@@ -682,6 +682,17 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
});
}
/**
* Returns the Shared Document Url of the conference.
*
* @returns {Object} Rooms info.
*/
async getSharedDocumentUrl() {
return this._transport.sendRequest({
name: 'get-shared-document-url'
});
}
/**
* Returns whether the conference is P2P.
*