diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 5c9ef3f15f..089fbc13f4 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -42,6 +42,17 @@ const formatButtonList = [ _td("numbered-list"), ]; +function Avatar(props) { + const MemberStatusMessageAvatar = sdk.getComponent('avatars.MemberStatusMessageAvatar'); + return
+ +
; +} + +Avatar.propTypes = { + me: PropTypes.object.isRequired, +} + function CallButton(props) { const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); const onVoiceCallClick = (ev) => { @@ -280,26 +291,12 @@ export default class MessageComposer extends React.Component { render() { const uploadInputStyle = {display: 'none'}; - const MemberStatusMessageAvatar = sdk.getComponent('avatars.MemberStatusMessageAvatar'); const MessageComposerInput = sdk.getComponent("rooms.MessageComposerInput"); - const controls = []; - - if (this.state.me) { - controls.push( -
- -
, - ); - } - - if (this.props.e2eStatus) { - controls.push( - ); - } + const controls = [ + this.state.me ? : null, + this.props.e2eStatus ? : null, + ]; let callButton; let videoCallButton;