Files
upstream-mirror 1d2bfcac0c
Some checks failed
Prosody Plugin Tests / test (push) Failing after 10m11s
Close stale issues and PRs / stale (push) Failing after 1s
snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
2026-09-15 15:56:32 +05:00

34 lines
907 B
TypeScript

import { IStateful } from '../base/app/types';
import { toState } from '../base/redux/functions';
const ETHERPAD_OPTIONS = {
showControls: 'true',
showChat: 'false',
showLineNumbers: 'true',
useMonospaceFont: 'false'
};
/**
* Retrieves the current sahred document URL.
*
* @param {Function|Object} stateful - The redux store or {@code getState} function.
* @returns {?string} - Current shared document URL or undefined.
*/
export function getSharedDocumentUrl(stateful: IStateful) {
const state = toState(stateful);
const { documentUrl } = state['features/etherpad'];
const { displayName } = state['features/base/settings'];
if (!documentUrl) {
return undefined;
}
const params = new URLSearchParams(ETHERPAD_OPTIONS);
if (displayName) {
params.append('userName', displayName);
}
return `${documentUrl}?${params.toString()}`;
}