openvidu-components: Fixed bug if ID is not in the connection data

pull/707/head
csantosm 2022-03-08 17:20:19 +01:00
parent b5a0ab434a
commit 4d659581b7
1 changed files with 4 additions and 1 deletions

View File

@ -192,7 +192,10 @@ export class ParticipantService {
connectionId
};
const participantId = this.getParticipantIdFromData(data);
// Avoiding create a new participant if participantId param is not exist in connection data
// participant Id is necessary for allowing to have multiple connection in one participant
const participantId = this.getParticipantIdFromData(data) || connectionId;
const participantAdded = this.getRemoteParticipantById(participantId);
if (!!participantAdded) {
this.log.d('Adding connection to existing participant: ', participantId);