in src/global_map.js [31:45]
async function addNewParticipantsToMap(event) {
const newPeersIds = []
const newCount = event.newValue
const oldCount = event.oldValue
for (let i = oldCount; i < newCount; i++) {
const allPeersIds = await getAllPeersIds()
newPeersIds.push(allPeersIds[i])
}
for (const newPeerId of newPeersIds) {
if (!Object.prototype.hasOwnProperty.call(map, newPeerId)) {
await map.set(newPeerId, participantsStartValue)
}
}
return newPeersIds
}