Add voice broadcast recording body (#9316)

* Add voice broadcast recording body

* Change icon element; update css variables

* Update Icon-test snapshots
This commit is contained in:
Michael Weimann 2022-09-26 15:29:38 +02:00 committed by GitHub
parent d077ea1990
commit 8e719d57a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 1059 additions and 7 deletions

View file

@ -42,6 +42,7 @@ import MLocationBody from "./MLocationBody";
import MjolnirBody from "./MjolnirBody";
import MBeaconBody from "./MBeaconBody";
import { IEventTileOps } from "../rooms/EventTile";
import { VoiceBroadcastBody, VoiceBroadcastInfoEventType, VoiceBroadcastInfoState } from '../../../voice-broadcast';
// onMessageAllowed is handled internally
interface IProps extends Omit<IBodyProps, "onMessageAllowed" | "mediaEventHelper"> {
@ -74,6 +75,7 @@ const baseEvTypes = new Map<string, React.ComponentType<Partial<IBodyProps>>>([
[M_POLL_START.altName, MPollBody],
[M_BEACON_INFO.name, MBeaconBody],
[M_BEACON_INFO.altName, MBeaconBody],
[VoiceBroadcastInfoEventType, VoiceBroadcastBody],
]);
export default class MessageEvent extends React.Component<IProps> implements IMediaBody, IOperableEventTile {
@ -171,6 +173,10 @@ export default class MessageEvent extends React.Component<IProps> implements IMe
) {
BodyType = MLocationBody;
}
if (type === VoiceBroadcastInfoEventType && content?.state === VoiceBroadcastInfoState.Started) {
BodyType = VoiceBroadcastBody;
}
}
if (SettingsStore.getValue("feature_mjolnir")) {