snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
20
react/features/base/util/getUnsafeRoomText.web.ts
Normal file
20
react/features/base/util/getUnsafeRoomText.web.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user