Files
jitsi-meet/react/features/base/util/getUnsafeRoomText.web.ts
luzpaz 30595584a3 chore(typos) fix various typos
Found via `codespell -q 3 -S "*.svg,./lang" -L anser,bu,dialin,goup,miliseconds,nd,vew`
2024-12-20 07:58:31 +01:00

21 lines
726 B
TypeScript

import { translateToHTML } from '../i18n/functions';
import { SECURITY_URL } from './contants';
/**
* Gets the unsafe room text for the given context.
*
* @param {Function} t - The translation function.
* @param {'meeting'|'prejoin'|'welcome'} context - The given context of the warning.
* @returns {string}
*/
export default function getUnsafeRoomText(t: Function, context: 'meeting' | 'prejoin' | 'welcome') {
const securityUrl = APP.store.getState()['features/base/config'].legalUrls?.security ?? SECURITY_URL;
const options = {
recommendAction: t(`security.unsafeRoomActions.${context}`),
securityUrl
};
return translateToHTML(t, 'security.insecureRoomNameWarningWeb', options);
}