hardlounge/client/js/socket-events/msg_special.ts

15 lines
312 B
TypeScript
Raw Normal View History

import socket from "../socket";
import {store} from "../store";
import {switchToChannel} from "../router";
socket.on("msg:special", function (data) {
const netChan = store.getters.findChannel(data.chan);
if (!netChan) {
return;
}
netChan.channel.data = data.data;
switchToChannel(netChan.channel);
});