mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
if devices are paired a second time, the old roomSecret is deleted upon saving the new one.
This commit is contained in:
parent
414cc9aa57
commit
b933ef151a
5 changed files with 26 additions and 18 deletions
|
@ -83,7 +83,7 @@ class ServerConnection {
|
|||
Events.fire('pair-device-initiated', msg);
|
||||
break;
|
||||
case 'pair-device-joined':
|
||||
Events.fire('pair-device-joined', msg.roomSecret);
|
||||
Events.fire('pair-device-joined', msg);
|
||||
break;
|
||||
case 'pair-device-join-key-invalid':
|
||||
Events.fire('pair-device-join-key-invalid');
|
||||
|
@ -726,7 +726,7 @@ class PeersManager {
|
|||
msg.peers.forEach(peer => {
|
||||
if (this.peers[peer.id]) {
|
||||
// if different roomType -> abort
|
||||
if (this.peers[peer.id].roomType !== msg.roomType) return;
|
||||
if (this.peers[peer.id].roomType !== msg.roomType || this.peers[peer.id].roomSecret !== msg.roomSecret) return;
|
||||
this.peers[peer.id].refresh();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue