RingRTC: Update to v2.6.0

This commit is contained in:
Peter Thatcher 2020-09-11 17:53:19 -07:00 committed by Josh Perez
parent b13dbcfa77
commit 3c9c581854
3 changed files with 33 additions and 6 deletions

View file

@ -129,7 +129,7 @@
"redux-ts-utils": "3.2.2",
"reselect": "4.0.0",
"rimraf": "2.6.2",
"ringrtc": "https://github.com/signalapp/signal-ringrtc-node.git#4ad4a1b0fcc9d89231ea48d62523f57936d69b2a",
"ringrtc": "https://github.com/signalapp/signal-ringrtc-node.git#de898334b4a9d9dc70486f63e15ce1113d3ba699",
"sanitize-filename": "1.6.3",
"sanitize.css": "11.0.0",
"semver": "5.4.1",

View file

@ -13,6 +13,8 @@ import {
RingRTC,
UserId,
} from 'ringrtc';
// ts-ignore
import is from '@sindresorhus/is';
import {
@ -393,13 +395,36 @@ export class CallingClass {
return;
}
const remoteUserId = envelope.source || envelope.sourceUuid;
const remoteUserId = envelope.sourceUuid || envelope.source;
const remoteDeviceId = this.parseDeviceId(envelope.sourceDevice);
if (!remoteUserId || !remoteDeviceId || !this.localDeviceId) {
window.log.error('Missing identifier, ignoring call message.');
return;
}
const senderIdentityRecord = window.textsecure.storage.protocol.getIdentityRecord(
remoteUserId
);
if (!senderIdentityRecord) {
window.log.error(
'Missing sender identity record; ignoring call message.'
);
return;
}
const senderIdentityKey = senderIdentityRecord.publicKey.slice(1); // Ignore the type header, it is not used.
const receiverIdentityRecord = window.textsecure.storage.protocol.getIdentityRecord(
window.textsecure.storage.user.getUuid() ||
window.textsecure.storage.user.getNumber()
);
if (!receiverIdentityRecord) {
window.log.error(
'Missing receiver identity record; ignoring call message.'
);
return;
}
const receiverIdentityKey = receiverIdentityRecord.publicKey.slice(1); // Ignore the type header, it is not used.
const messageAgeSec = envelope.messageAgeSec ? envelope.messageAgeSec : 0;
RingRTC.handleCallingMessage(
@ -407,7 +432,9 @@ export class CallingClass {
remoteDeviceId,
this.localDeviceId,
messageAgeSec,
callingMessage
callingMessage,
senderIdentityKey,
receiverIdentityKey
);
}

View file

@ -14065,9 +14065,9 @@ rimraf@~2.4.0:
dependencies:
glob "^6.0.1"
"ringrtc@https://github.com/signalapp/signal-ringrtc-node.git#4ad4a1b0fcc9d89231ea48d62523f57936d69b2a":
version "2.5.2"
resolved "https://github.com/signalapp/signal-ringrtc-node.git#4ad4a1b0fcc9d89231ea48d62523f57936d69b2a"
"ringrtc@https://github.com/signalapp/signal-ringrtc-node.git#de898334b4a9d9dc70486f63e15ce1113d3ba699":
version "2.6.0"
resolved "https://github.com/signalapp/signal-ringrtc-node.git#de898334b4a9d9dc70486f63e15ce1113d3ba699"
ripemd160@^2.0.0, ripemd160@^2.0.1:
version "2.0.1"