diff --git a/client/js/commands/search.js b/client/js/commands/search.js index 31e8c49b..9ae928e4 100644 --- a/client/js/commands/search.js +++ b/client/js/commands/search.js @@ -4,15 +4,19 @@ import store from "../store"; import {router} from "../router"; function input(args) { - router.push({ - name: "SearchResults", - params: { - id: store.state.activeChannel.channel.id, - }, - query: { - q: args.join(" "), - }, - }); + if (!store.state.settings.searchEnabled) { + store.commit("currentUserVisibleError", "Search is currently not enabled."); + } else { + router.push({ + name: "SearchResults", + params: { + id: store.state.activeChannel.channel.id, + }, + query: { + q: args.join(" "), + }, + }); + } return true; }