You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Render voice messages as audio messages for now
This commit is contained in:
@@ -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});
|
||||||
|
|||||||
Reference in New Issue
Block a user