mirror of
https://github.com/thelounge/thelounge
synced 2024-11-24 21:13:06 +00:00
socket-events: fix network:status
This commit is contained in:
parent
fe4f497fad
commit
3ea5170e6a
1 changed files with 2 additions and 2 deletions
|
@ -3,6 +3,7 @@ import {store} from "../store";
|
|||
import {switchToChannel} from "../router";
|
||||
import {toClientChan} from "../chan";
|
||||
import {ClientNetwork} from "../types";
|
||||
import {ChanState} from "../../../shared/types/chan";
|
||||
|
||||
socket.on("network", function (data) {
|
||||
const network: ClientNetwork = {
|
||||
|
@ -38,8 +39,7 @@ socket.on("network:status", function (data) {
|
|||
|
||||
if (!data.connected) {
|
||||
network.channels.forEach((channel) => {
|
||||
channel.users = [];
|
||||
channel.state = 0;
|
||||
channel.state = ChanState.PARTED;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue