mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 05:50:22 +00:00
dd05ee3a65
Co-authored-by: Eric Nemchik <eric@nemchik.com> Co-authored-by: Pavel Djundik <xPaw@users.noreply.github.com>
18 lines
420 B
TypeScript
18 lines
420 B
TypeScript
import socket from "../socket";
|
|
import {store} from "../store";
|
|
|
|
socket.on("mute:changed", (response) => {
|
|
const {target, status} = response;
|
|
|
|
const netChan = store.getters.findChannel(target);
|
|
|
|
if (netChan?.channel.type === "lobby") {
|
|
for (const chan of netChan.network.channels) {
|
|
if (chan.type !== "special") {
|
|
chan.muted = status;
|
|
}
|
|
}
|
|
} else if (netChan) {
|
|
netChan.channel.muted = status;
|
|
}
|
|
});
|