Skip to content

Commit

Permalink
openvidu-components: Fixed connection data parse on new connection
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Apr 24, 2023
1 parent d7e7cfe commit 5f8fa08
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ export class ParticipantService {
*/
getNicknameFromConnectionData(data: string): string {
try {
return JSON.parse(data).clientData;
const dataClean = data.replace('%/%{}', '');
return JSON.parse(dataClean).clientData;
} catch (error) {
return 'OpenVidu_User';
}
Expand Down

0 comments on commit 5f8fa08

Please sign in to comment.