Enable support for image, video and audio files
This commit is contained in:
parent
409213ceb4
commit
59c1b67b7d
8 changed files with 86 additions and 21 deletions
|
@ -23,6 +23,7 @@ import MVoiceMessageBody from "./MVoiceMessageBody";
|
|||
|
||||
interface IProps {
|
||||
mxEvent: MatrixEvent;
|
||||
mediaSrc?: string;
|
||||
}
|
||||
|
||||
@replaceableComponent("views.messages.MVoiceOrAudioBody")
|
||||
|
@ -30,7 +31,7 @@ export default class MVoiceOrAudioBody extends React.PureComponent<IProps> {
|
|||
public render() {
|
||||
const isVoiceMessage = !!this.props.mxEvent.getContent()['org.matrix.msc2516.voice'];
|
||||
const voiceMessagesEnabled = SettingsStore.getValue("feature_voice_messages");
|
||||
if (isVoiceMessage && voiceMessagesEnabled) {
|
||||
if (isVoiceMessage && voiceMessagesEnabled && !this.props.mediaSrc) {
|
||||
return <MVoiceMessageBody {...this.props} />;
|
||||
} else {
|
||||
return <MAudioBody {...this.props} />;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue