diff options
author | Chris <ccbrown112@gmail.com> | 2017-07-04 18:26:31 -0700 |
---|---|---|
committer | Saturnino Abril <saturnino.abril@gmail.com> | 2017-07-05 09:26:31 +0800 |
commit | 5bd60a4d1ea36839e7bdc8cc65f9038ac3732d5f (patch) | |
tree | f2b421626d32c86be119c81cf84cd5420d9f2033 /webapp/actions | |
parent | 8f8a978e84ec8bbeac22928e6112bc697fa7176d (diff) | |
download | chat-5bd60a4d1ea36839e7bdc8cc65f9038ac3732d5f.tar.gz chat-5bd60a4d1ea36839e7bdc8cc65f9038ac3732d5f.tar.bz2 chat-5bd60a4d1ea36839e7bdc8cc65f9038ac3732d5f.zip |
add /search command (#6741)
Diffstat (limited to 'webapp/actions')
-rw-r--r-- | webapp/actions/channel_actions.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webapp/actions/channel_actions.jsx b/webapp/actions/channel_actions.jsx index 887aca030..6e529d332 100644 --- a/webapp/actions/channel_actions.jsx +++ b/webapp/actions/channel_actions.jsx @@ -8,6 +8,7 @@ import * as ChannelUtils from 'utils/channel_utils.jsx'; import PreferenceStore from 'stores/preference_store.jsx'; import * as GlobalActions from 'actions/global_actions.jsx'; +import * as PostActions from 'actions/post_actions.jsx'; import {loadProfilesForSidebar, loadNewDMIfNeeded, loadNewGMIfNeeded} from 'actions/user_actions.jsx'; import {trackEvent} from 'actions/diagnostics_actions.jsx'; @@ -57,6 +58,9 @@ export function executeCommand(message, args, success, error) { msg = cmd + msg.substring(cmdLength, msg.length); switch (cmd) { + case '/search': + PostActions.searchForTerm(msg.substring(cmdLength + 1, msg.length)); + return; case '/shortcuts': if (UserAgent.isMobile()) { const err = {message: Utils.localizeMessage('create_post.shortcutsNotSupported', 'Keyboard shortcuts are not supported on your device')}; |