#4
All checks were successful
Deploy / deploy (push) Successful in 43s

This commit is contained in:
Никита Круглицкий 2025-10-06 23:03:06 +06:00
parent d224ccc52e
commit 87b4c1489e

View File

@ -136,7 +136,7 @@ export default function (io: SocketServer, router: types.Router) {
socket.data.username = username
socket.data.rtpCapabilities = rtpCapabilities
const joinedSockets = await getJoinedSockets(socket.id)
const joinedSockets = await getJoinedSockets()
cb(joinedSockets.map((s) => {
return {
@ -145,7 +145,7 @@ export default function (io: SocketServer, router: types.Router) {
}
}))
for (const joinedSocket of joinedSockets) {
for (const joinedSocket of joinedSockets.filter(joinedSocket => joinedSocket.id !== socket.id)) {
for (const producer of joinedSocket.data.producers.values()) {
createConsumer(
socket,
@ -259,8 +259,7 @@ export default function (io: SocketServer, router: types.Router) {
cb({ id: producer.id })
const sockets = await namespace.fetchSockets()
const otherSockets = sockets.filter(s => s.id !== socket.id)
const otherSockets = await namespace.fetchSockets(socket.id)
for (const otherSocket of otherSockets) {
createConsumer(