Render voice messages as audio messages for now

This commit is contained in:
Travis Ralston 2021-03-16 23:48:47 -06:00
parent 1dc2427128
commit f0d5edbc37
2 changed files with 5 additions and 1 deletions

View file

@ -71,6 +71,10 @@ export default class MessageEvent extends React.Component {
'm.file': sdk.getComponent('messages.MFileBody'),
'm.audio': sdk.getComponent('messages.MAudioBody'),
'm.video': sdk.getComponent('messages.MVideoBody'),
// TODO: @@ TravisR: Use labs flag determination.
// MSC: https://github.com/matrix-org/matrix-doc/pull/2516
'org.matrix.msc2516.voice': sdk.getComponent('messages.MAudioBody'),
};
const evTypes = {
'm.sticker': sdk.getComponent('messages.MStickerBody'),

View file

@ -47,7 +47,7 @@ export default class VoiceRecordComposerTile extends React.PureComponent<IProps,
const mxc = await this.state.recorder.upload();
MatrixClientPeg.get().sendMessage(this.props.room.roomId, {
body: "Voice message",
msgtype: "m.audio", // TODO @@
msgtype: "org.matrix.msc2516.voice",
url: mxc,
});
this.setState({recorder: null});