4be9a282fa
Co-authored-by: Reto <reto@labrat.space>
18 lines
390 B
JavaScript
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;
|
|
}
|
|
});
|