diff options
Diffstat (limited to 'vnext/src/components/Chat.js')
-rw-r--r-- | vnext/src/components/Chat.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vnext/src/components/Chat.js b/vnext/src/components/Chat.js index 66e7f804..916de003 100644 --- a/vnext/src/components/Chat.js +++ b/vnext/src/components/Chat.js @@ -33,6 +33,14 @@ export default class Chat extends React.Component { } } + onMessage = (msg) => { + if (msg.user.uname === this.props.match.params.user) { + this.setState({ + chats: [msg, ...this.state.chats] + }); + } + } + onSend = (template) => { pm(template.to.uname, template.body) .then(res => { |