fix error on empty roomSecrets

This commit is contained in:
schlagmichdoch 2023-05-11 22:42:45 +02:00
parent 347f9b87c0
commit ba20c72026

View file

@ -215,9 +215,14 @@ class PairDropServer {
}
_onRoomSecrets(sender, message) {
if (!message.roomSecrets) return;
const roomSecrets = message.roomSecrets.filter(roomSecret => {
return /^[\x00-\x7F]{64,256}$/.test(roomSecret);
})
if (!roomSecrets) return;
this._joinSecretRooms(sender, roomSecrets);
}
@ -481,7 +486,7 @@ class Peer {
this._setIP(request);
// set peer id
this._setPeerId(request)
this._setPeerId(request);
// is WebRTC supported ?
this.rtcSupported = request.url.indexOf('webrtc') > -1;