Override audio and video body with file body

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-07-14 10:47:29 +02:00
parent 04db6beb10
commit 782563af53
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
2 changed files with 12 additions and 4 deletions

View file

@ -27,6 +27,7 @@ import * as sdk from '../../../index';
import { EventType, MsgType } from 'matrix-js-sdk/src/@types/event';
import { replaceableComponent } from '../../../utils/replaceableComponent';
import { getEventDisplayInfo } from '../../../utils/EventUtils';
import MFileBody from "../messages/MFileBody";
interface IProps {
mxEvent: MatrixEvent;
@ -115,8 +116,9 @@ export default class ReplyTile extends React.PureComponent<IProps> {
const msgtypeOverrides = {
[MsgType.Image]: MImageReplyBody,
[MsgType.Audio]: TextualBody,
[MsgType.Video]: TextualBody,
// Override audio and video body with file body. We also hide the download/decrypt button using CSS
[MsgType.Audio]: MFileBody,
[MsgType.Video]: MFileBody,
};
const evOverrides = {
[EventType.Sticker]: TextualBody,