summaryrefslogtreecommitdiffstats
path: root/webapp/components/create_post.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-23 10:20:52 -0400
committerChristopher Speller <crspeller@gmail.com>2016-03-23 10:38:35 -0400
commit9239a7353af2c67a6778ff4cabd164db62087bde (patch)
tree78335a5254885058ed3b224a4b050db03c732bb3 /webapp/components/create_post.jsx
parent6568e15023c009c96a46f022236f5fd4415445c0 (diff)
downloadchat-9239a7353af2c67a6778ff4cabd164db62087bde.tar.gz
chat-9239a7353af2c67a6778ff4cabd164db62087bde.tar.bz2
chat-9239a7353af2c67a6778ff4cabd164db62087bde.zip
Fixing websocket connection issue. Refactoring websockets into an action creator.
Diffstat (limited to 'webapp/components/create_post.jsx')
-rw-r--r--webapp/components/create_post.jsx7
1 files changed, 1 insertions, 6 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx
index 36bfbf22d..e5e99debd 100644
--- a/webapp/components/create_post.jsx
+++ b/webapp/components/create_post.jsx
@@ -19,7 +19,6 @@ import ChannelStore from 'stores/channel_store.jsx';
import PostStore from 'stores/post_store.jsx';
import UserStore from 'stores/user_store.jsx';
import PreferenceStore from 'stores/preference_store.jsx';
-import SocketStore from 'stores/socket_store.jsx';
import Constants from 'utils/constants.jsx';
@@ -213,11 +212,7 @@ class CreatePost extends React.Component {
}
}
- const t = Date.now();
- if ((t - this.lastTime) > Constants.UPDATE_TYPING_MS) {
- SocketStore.sendMessage({channel_id: this.state.channelId, action: 'typing', props: {parent_id: ''}, state: {}});
- this.lastTime = t;
- }
+ GlobalActions.emitLocalUserTypingEvent(this.state.channelId, '');
}
handleUserInput(messageText) {
this.setState({messageText});