Render voice messages as audio messages for now
This commit is contained in:
parent
1dc2427128
commit
f0d5edbc37
2 changed files with 5 additions and 1 deletions
|
@ -71,6 +71,10 @@ export default class MessageEvent extends React.Component {
|
||||||
'm.file': sdk.getComponent('messages.MFileBody'),
|
'm.file': sdk.getComponent('messages.MFileBody'),
|
||||||
'm.audio': sdk.getComponent('messages.MAudioBody'),
|
'm.audio': sdk.getComponent('messages.MAudioBody'),
|
||||||
'm.video': sdk.getComponent('messages.MVideoBody'),
|
'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 = {
|
const evTypes = {
|
||||||
'm.sticker': sdk.getComponent('messages.MStickerBody'),
|
'm.sticker': sdk.getComponent('messages.MStickerBody'),
|
||||||
|
|
|
@ -47,7 +47,7 @@ export default class VoiceRecordComposerTile extends React.PureComponent<IProps,
|
||||||
const mxc = await this.state.recorder.upload();
|
const mxc = await this.state.recorder.upload();
|
||||||
MatrixClientPeg.get().sendMessage(this.props.room.roomId, {
|
MatrixClientPeg.get().sendMessage(this.props.room.roomId, {
|
||||||
body: "Voice message",
|
body: "Voice message",
|
||||||
msgtype: "m.audio", // TODO @@
|
msgtype: "org.matrix.msc2516.voice",
|
||||||
url: mxc,
|
url: mxc,
|
||||||
});
|
});
|
||||||
this.setState({recorder: null});
|
this.setState({recorder: null});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue