1
0
mirror of https://github.com/hack-chat/main.git synced 2024-03-22 13:20:33 +08:00
This commit is contained in:
marzavec 2020-11-06 14:12:36 -08:00
parent 22772fa90c
commit 85b9ad08bb

View File

@ -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