mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-21 22:54:53 +08:00
move logging of rtc message from class Peer class to overwritten method in class RTCPeer
This commit is contained in:
@@ -320,7 +320,6 @@ class Peer {
|
||||
return;
|
||||
}
|
||||
message = JSON.parse(message);
|
||||
console.log('RTC:', message);
|
||||
switch (message.type) {
|
||||
case 'request':
|
||||
this._onFilesTransferRequest(message);
|
||||
@@ -568,6 +567,14 @@ class RTCPeer extends Peer {
|
||||
this._channel = channel;
|
||||
}
|
||||
|
||||
_onMessage(message) {
|
||||
if (typeof message === 'string') {
|
||||
message = JSON.parse(message);
|
||||
console.log('RTC:', message);
|
||||
}
|
||||
super._onMessage(message);
|
||||
}
|
||||
|
||||
getConnectionHash() {
|
||||
const localDescriptionLines = this._conn.localDescription.sdp.split("\r\n");
|
||||
const remoteDescriptionLines = this._conn.remoteDescription.sdp.split("\r\n");
|
||||
|
||||
Reference in New Issue
Block a user