thelounge/client/js/socket-events/mute_changed.js
Max Leiter 4be9a282fa
Add the option to mute channels, queries, and networks (#4282)
Co-authored-by: Reto <reto@labrat.space>
2022-02-10 17:56:17 -08:00

18 lines
390 B
JavaScript

import socket from "../socket";
import store from "../store";
socket.on("mute:changed", (response) => {
const {target, status} = response;
const {channel, network} = store.getters.findChannel(target);
if (channel.type === "lobby") {
for (const chan of network.channels) {
if (chan.type !== "special") {
chan.muted = status;
}
}
} else {
channel.muted = status;
}
});