summaryrefslogtreecommitdiffstats
path: root/web/react/components/new_channel.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-08-14 08:35:19 -0400
committerChristopher Speller <crspeller@gmail.com>2015-08-14 08:35:19 -0400
commita8930cbabec21635a10e8cac4d2c0c79867f283d (patch)
treea622f8d94fa1b60753896640c1f8c1a5ebaf48e2 /web/react/components/new_channel.jsx
parentb1d37e9c385f0d3e9bddd9dffe1570574dcdcab6 (diff)
parent2485b87b28a7fed1996d627b48dcd94f19002fc8 (diff)
downloadchat-a8930cbabec21635a10e8cac4d2c0c79867f283d.tar.gz
chat-a8930cbabec21635a10e8cac4d2c0c79867f283d.tar.bz2
chat-a8930cbabec21635a10e8cac4d2c0c79867f283d.zip
Merge pull request #365 from mattermost/mm-1700
MM-1700 don't pull all channel data all the time
Diffstat (limited to 'web/react/components/new_channel.jsx')
-rw-r--r--web/react/components/new_channel.jsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/web/react/components/new_channel.jsx b/web/react/components/new_channel.jsx
index c22147022..b00376758 100644
--- a/web/react/components/new_channel.jsx
+++ b/web/react/components/new_channel.jsx
@@ -55,16 +55,16 @@ module.exports = React.createClass({
channel.description = this.refs.channel_desc.getDOMNode().value.trim();
channel.type = this.state.channelType;
- var self = this;
client.createChannel(channel,
- function() {
+ function(data) {
+ $(this.refs.modal.getDOMNode()).modal('hide');
+
+ asyncClient.getChannel(data.id);
+ utils.switchChannel(data);
+
this.refs.display_name.getDOMNode().value = '';
this.refs.channel_name.getDOMNode().value = '';
this.refs.channel_desc.getDOMNode().value = '';
-
- $(self.refs.modal.getDOMNode()).modal('hide');
- window.location = TeamStore.getCurrentTeamUrl() + '/channels/' + channel.name;
- asyncClient.getChannels(true);
}.bind(this),
function(err) {
state.serverError = err.message;