mirror of
https://github.com/hack-chat/main.git
synced 2024-03-22 13:20:33 +08:00
Bug fix
This commit is contained in:
parent
22772fa90c
commit
85b9ad08bb
|
@ -80,15 +80,14 @@ export async function run({
|
||||||
|
|
||||||
// Announce the kicked clients arrival in destChannel and that they were kicked
|
// Announce the kicked clients arrival in destChannel and that they were kicked
|
||||||
// Before they arrive, so they don't see they got moved
|
// Before they arrive, so they don't see they got moved
|
||||||
const moveAnnouncement = {
|
for (let i = 0; i < kicked.length; i += 1) {
|
||||||
...getUserDetails(socket),
|
server.broadcast({
|
||||||
|
...getUserDetails(kicked[i]),
|
||||||
...{
|
...{
|
||||||
cmd: 'onlineAdd',
|
cmd: 'onlineAdd',
|
||||||
channel: destChannel, // @todo Multichannel
|
channel: destChannel, // @todo Multichannel
|
||||||
},
|
},
|
||||||
};
|
}, { channel: destChannel });
|
||||||
for (let i = 0; i < kicked.length; i += 1) {
|
|
||||||
server.broadcast(moveAnnouncement, { channel: destChannel });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move all kicked clients to the new channel
|
// Move all kicked clients to the new channel
|
||||||
|
|
Loading…
Reference in New Issue
Block a user