Handle missing Element Call brand
(#9376)
This commit is contained in:
parent
26a74a193f
commit
5680d13acf
6 changed files with 19 additions and 14 deletions
|
@ -32,7 +32,7 @@ import SettingsFieldset from '../../SettingsFieldset';
|
|||
import SettingsStore from "../../../../../settings/SettingsStore";
|
||||
import { VoiceBroadcastInfoEventType } from '../../../../../voice-broadcast';
|
||||
import { ElementCall } from "../../../../../models/Call";
|
||||
import SdkConfig from "../../../../../SdkConfig";
|
||||
import SdkConfig, { DEFAULTS } from "../../../../../SdkConfig";
|
||||
|
||||
interface IEventShowOpts {
|
||||
isState?: boolean;
|
||||
|
@ -446,7 +446,7 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
|
|||
|
||||
let label = plEventsToLabels[eventType];
|
||||
if (label) {
|
||||
const brand = SdkConfig.get("element_call").brand;
|
||||
const brand = SdkConfig.get("element_call").brand ?? DEFAULTS.element_call.brand;
|
||||
label = _t(label, { brand });
|
||||
} else {
|
||||
label = _t("Send %(eventType)s events", { eventType });
|
||||
|
|
|
@ -25,7 +25,7 @@ import SettingsSubsection from "../../shared/SettingsSubsection";
|
|||
import SettingsTab from "../SettingsTab";
|
||||
import { ElementCall } from "../../../../../models/Call";
|
||||
import { useRoomState } from "../../../../../hooks/useRoomState";
|
||||
import SdkConfig from "../../../../../SdkConfig";
|
||||
import SdkConfig, { DEFAULTS } from "../../../../../SdkConfig";
|
||||
|
||||
interface ElementCallSwitchProps {
|
||||
roomId: string;
|
||||
|
@ -69,7 +69,7 @@ const ElementCallSwitch: React.FC<ElementCallSwitchProps> = ({ roomId }) => {
|
|||
});
|
||||
}, [roomId, content, events, isPublic]);
|
||||
|
||||
const brand = SdkConfig.get("element_call").brand;
|
||||
const brand = SdkConfig.get("element_call").brand ?? DEFAULTS.element_call.brand;
|
||||
|
||||
return <LabelledToggleSwitch
|
||||
data-testid="element-call-switch"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue