Add voice broadcast permissions (#9284)

* Add Voice Broadcast labs setting and composer button

* Implement strict typing

* Extend MessageComposer-test

* Extend tests

* Revert some strict type fixex

* Implement voice broadcast permissions

* Update variable casing
This commit is contained in:
Michael Weimann 2022-09-19 08:42:29 +02:00 committed by GitHub
parent cb735c9439
commit 0cc4f4e1bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 123 additions and 3 deletions

View file

@ -30,6 +30,7 @@ import ErrorDialog from '../../../dialogs/ErrorDialog';
import PowerSelector from "../../../elements/PowerSelector";
import SettingsFieldset from '../../SettingsFieldset';
import SettingsStore from "../../../../../settings/SettingsStore";
import { VoiceBroadcastInfoEventType } from '../../../../../voice-broadcast';
interface IEventShowOpts {
isState?: boolean;
@ -61,6 +62,7 @@ const plEventsToShow: Record<string, IEventShowOpts> = {
// TODO: Enable support for m.widget event type (https://github.com/vector-im/element-web/issues/13111)
"im.vector.modular.widgets": { isState: true, hideForSpace: true },
[VoiceBroadcastInfoEventType]: { isState: true, hideForSpace: true },
};
// parse a string as an integer; if the input is undefined, or cannot be parsed
@ -244,6 +246,7 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
// TODO: Enable support for m.widget event type (https://github.com/vector-im/element-web/issues/13111)
"im.vector.modular.widgets": isSpaceRoom ? null : _td("Modify widgets"),
[VoiceBroadcastInfoEventType]: _td("Voice broadcasts"),
};
if (SettingsStore.getValue("feature_pinning")) {