thelounge/client/js/socket-events/search.ts

14 lines
320 B
TypeScript
Raw Normal View History

2019-12-31 17:21:34 +01:00
import socket from "../socket";
import {store} from "../store";
2019-12-31 17:21:34 +01:00
socket.on("search:results", (response) => {
store.commit("messageSearchInProgress", false);
if (store.state.messageSearchResults) {
store.commit("addMessageSearchResults", response);
return;
}
2019-12-31 17:21:34 +01:00
store.commit("messageSearchResults", response);
});