remove notification for new displayName as peerId and display name is persistent again

This commit is contained in:
schlagmichdoch 2023-01-06 15:09:01 +01:00
parent 621c525d11
commit 98a6f63799
2 changed files with 3 additions and 6 deletions

View file

@ -43,7 +43,7 @@ class ServerConnection {
this.send({ type: 'pong' });
break;
case 'display-name':
sessionStorage.setItem("peer_id", msg.message.peerId);
sessionStorage.setItem("peerId", msg.message.peerId);
Events.fire('display-name', msg);
break;
default:
@ -61,8 +61,8 @@ class ServerConnection {
const protocol = location.protocol.startsWith('https') ? 'wss' : 'ws';
const webrtc = window.isRtcSupported ? '/webrtc' : '/fallback';
let url = new URL(protocol + '://' + location.host + location.pathname + 'server' + webrtc);
if (sessionStorage.getItem('peer_id')) {
url.searchParams.append('peer_id', sessionStorage.getItem('peer_id'))
if (sessionStorage.getItem('peerId')) {
url.searchParams.append('peer_id', sessionStorage.getItem('peerId'))
}
return url.toString();
}