diff --git a/client/js/store.js b/client/js/store.js index b1f24d48..c9508fc8 100644 --- a/client/js/store.js +++ b/client/js/store.js @@ -17,23 +17,7 @@ function detectDesktopNotificationState() { return "blocked"; } -let store = null; - -const setMessageNetworkChannel = (message) => { - const channelAndNetwork = store.getters.findChannelOnNetwork( - message.networkUuid, - message.channelName - ); - - if (channelAndNetwork) { - message.network = channelAndNetwork.network; - message.channel = channelAndNetwork.channel; - } - - return message; -}; - -store = new Vuex.Store({ +const store = new Vuex.Store({ state: { appLoaded: false, activeChannel: null, @@ -135,23 +119,11 @@ store = new Vuex.Store({ state.messageSearchInProgress = value; }, messageSearchResults(state, value) { - if (value) { - // Set the search results and add networks and channels to messages - state.messageSearchResults = { - ...value, - ...value.results.map(setMessageNetworkChannel), - }; - return; - } - state.messageSearchResults = value; }, addMessageSearchResults(state, value) { // Append the search results and add networks and channels to new messages - value.results = [ - ...state.messageSearchResults.results, - ...value.results.map(setMessageNetworkChannel), - ]; + value.results = [...state.messageSearchResults.results, ...value.results]; state.messageSearchResults = value; },