aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/MessageInput.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-20 16:33:51 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:52 +0300
commit504c080d8fa091682dd9f6a5bbc261375ca03861 (patch)
tree8dd5ca7d03207090fd72f6d5eb12ce3afa92e7ce /vnext/src/components/MessageInput.js
parent2e461ef5ae03404cc9e5fb3eb676402e5aca668d (diff)
post comments
Diffstat (limited to 'vnext/src/components/MessageInput.js')
-rw-r--r--vnext/src/components/MessageInput.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/vnext/src/components/MessageInput.js b/vnext/src/components/MessageInput.js
index a276225b..30c411fd 100644
--- a/vnext/src/components/MessageInput.js
+++ b/vnext/src/components/MessageInput.js
@@ -27,11 +27,12 @@ export default class MessageInput extends React.Component {
onSubmit(event) {
event.preventDefault();
+ const input = this.fileinput.current;
this.props.onSend({
mid: this.state.mid,
rid: this.state.rid,
body: this.state.body,
- attach: this.state.attach
+ attach: this.state.attach ? input.files[0] : ''
})
}