[mirotalksfu] - on eject ban user, update dep.

هذا الالتزام موجود في:
Miroslav Pejic
2024-01-29 18:06:07 +01:00
الأصل f610949cee
التزام 9b23ae5d00
5 ملفات معدلة مع 85 إضافات و8 حذوفات

عرض الملف

@@ -31,6 +31,7 @@ module.exports = class Room {
this.survey = config.survey;
this.redirect = config.redirect;
this.peers = new Map();
this.bannedPeers = [];
this.router = null;
this.createTheRouter();
}
@@ -325,6 +326,24 @@ module.exports = class Room {
this.peers.get(socket_id).closeProducer(producer_id);
}
// ####################################################
// HANDLE BANNED PEERS
// ####################################################
addBannedPeer(uuid) {
if (!this.bannedPeers.includes(uuid)) {
this.bannedPeers.push(uuid);
log.debug('Added to the banned list', {
uuid: uuid,
banned: this.bannedPeers,
});
}
}
isBanned(uuid) {
return this.bannedPeers.includes(uuid);
}
// ####################################################
// ROOM STATUS
// ####################################################