summaryrefslogtreecommitdiffstats
path: root/webapp/actions/channel_actions.jsx
blob: 5dc83379eace3ae186a1c6adaef18f9d4e94bb31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import {browserHistory} from 'react-router';

import TeamStore from 'stores/team_store.jsx';
import Client from 'utils/web_client.jsx';

export function goToChannel(channel) {
    browserHistory.push(TeamStore.getCurrentTeamRelativeUrl() + '/channels/' + channel.name);
}

export function executeCommand(channelId, message, suggest, success, error) {
    Client.executeCommand(channelId, message, suggest, success, error);
}