From 504c080d8fa091682dd9f6a5bbc261375ca03861 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 20 Jun 2018 16:33:51 +0300 Subject: post comments --- vnext/src/components/MessageInput.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vnext/src/components/MessageInput.js') 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] : '' }) } -- cgit v1.2.3