Update to RingRTC v2.17.2
This commit is contained in:
parent
bd41bdf3cb
commit
ab9d33cf1a
5 changed files with 73 additions and 45 deletions
|
@ -163,7 +163,7 @@
|
|||
"redux-ts-utils": "3.2.2",
|
||||
"reselect": "4.1.2",
|
||||
"rimraf": "2.6.2",
|
||||
"ringrtc": "https://github.com/signalapp/signal-ringrtc-node.git#f25f900355bbd69821449a39ad88c5a1afdaaac3",
|
||||
"ringrtc": "https://github.com/signalapp/signal-ringrtc-node.git#f22009252bd3742f5b8a2761fe8f9c76a3bbc11d",
|
||||
"rotating-file-stream": "2.1.5",
|
||||
"sanitize.css": "11.0.0",
|
||||
"semver": "5.4.1",
|
||||
|
|
|
@ -3009,7 +3009,8 @@ export class ConversationModel extends window.Backbone
|
|||
}
|
||||
|
||||
async addCallHistory(
|
||||
callHistoryDetails: CallHistoryDetailsType
|
||||
callHistoryDetails: CallHistoryDetailsType,
|
||||
receivedAtCounter: number | undefined
|
||||
): Promise<void> {
|
||||
let timestamp: number;
|
||||
let unread: boolean;
|
||||
|
@ -3038,7 +3039,8 @@ export class ConversationModel extends window.Backbone
|
|||
conversationId: this.id,
|
||||
type: 'call-history',
|
||||
sent_at: timestamp,
|
||||
received_at: window.Signal.Util.incrementMessageCounter(),
|
||||
received_at:
|
||||
receivedAtCounter || window.Signal.Util.incrementMessageCounter(),
|
||||
received_at_ms: timestamp,
|
||||
readStatus: unread ? ReadStatus.Unread : ReadStatus.Read,
|
||||
callHistoryDetails: detailsToSave,
|
||||
|
@ -3081,12 +3083,15 @@ export class ConversationModel extends window.Backbone
|
|||
return false;
|
||||
}
|
||||
|
||||
await this.addCallHistory({
|
||||
callMode: CallMode.Group,
|
||||
creatorUuid,
|
||||
eraId,
|
||||
startedTime: Date.now(),
|
||||
});
|
||||
await this.addCallHistory(
|
||||
{
|
||||
callMode: CallMode.Group,
|
||||
creatorUuid,
|
||||
eraId,
|
||||
startedTime: Date.now(),
|
||||
},
|
||||
undefined
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1483,6 +1483,7 @@ export class CallingClass {
|
|||
remoteDeviceId,
|
||||
this.localDeviceId,
|
||||
messageAgeSec,
|
||||
envelope.receivedAtCounter,
|
||||
protoToCallingMessage(callingMessage),
|
||||
Buffer.from(senderIdentityKey),
|
||||
Buffer.from(receiverIdentityKey)
|
||||
|
@ -1763,7 +1764,9 @@ export class CallingClass {
|
|||
private handleAutoEndedIncomingCallRequest(
|
||||
remoteUserId: UserId,
|
||||
reason: CallEndedReason,
|
||||
ageInSeconds: number
|
||||
ageInSeconds: number,
|
||||
wasVideoCall: boolean,
|
||||
receivedAtCounter: number | undefined
|
||||
) {
|
||||
const conversation = window.ConversationController.get(remoteUserId);
|
||||
if (!conversation) {
|
||||
|
@ -1781,7 +1784,9 @@ export class CallingClass {
|
|||
this.addCallHistoryForAutoEndedIncomingCall(
|
||||
conversation,
|
||||
reason,
|
||||
endedTime
|
||||
endedTime,
|
||||
wasVideoCall,
|
||||
receivedAtCounter
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1975,14 +1980,17 @@ export class CallingClass {
|
|||
acceptedTime = Date.now();
|
||||
}
|
||||
|
||||
conversation.addCallHistory({
|
||||
callMode: CallMode.Direct,
|
||||
wasIncoming: call.isIncoming,
|
||||
wasVideoCall: call.isVideoCall,
|
||||
wasDeclined,
|
||||
acceptedTime,
|
||||
endedTime: Date.now(),
|
||||
});
|
||||
conversation.addCallHistory(
|
||||
{
|
||||
callMode: CallMode.Direct,
|
||||
wasIncoming: call.isIncoming,
|
||||
wasVideoCall: call.isVideoCall,
|
||||
wasDeclined,
|
||||
acceptedTime,
|
||||
endedTime: Date.now(),
|
||||
},
|
||||
undefined
|
||||
);
|
||||
}
|
||||
|
||||
private addCallHistoryForFailedIncomingCall(
|
||||
|
@ -1990,33 +1998,48 @@ export class CallingClass {
|
|||
wasVideoCall: boolean,
|
||||
timestamp: number
|
||||
) {
|
||||
conversation.addCallHistory({
|
||||
callMode: CallMode.Direct,
|
||||
wasIncoming: true,
|
||||
wasVideoCall,
|
||||
// Since the user didn't decline, make sure it shows up as a missed call instead
|
||||
wasDeclined: false,
|
||||
acceptedTime: undefined,
|
||||
endedTime: timestamp,
|
||||
});
|
||||
conversation.addCallHistory(
|
||||
{
|
||||
callMode: CallMode.Direct,
|
||||
wasIncoming: true,
|
||||
wasVideoCall,
|
||||
// Since the user didn't decline, make sure it shows up as a missed call instead
|
||||
wasDeclined: false,
|
||||
acceptedTime: undefined,
|
||||
endedTime: timestamp,
|
||||
},
|
||||
undefined
|
||||
);
|
||||
}
|
||||
|
||||
private addCallHistoryForAutoEndedIncomingCall(
|
||||
conversation: ConversationModel,
|
||||
_reason: CallEndedReason,
|
||||
endedTime: number
|
||||
reason: CallEndedReason,
|
||||
endedTime: number,
|
||||
wasVideoCall: boolean,
|
||||
receivedAtCounter: number | undefined
|
||||
) {
|
||||
conversation.addCallHistory({
|
||||
callMode: CallMode.Direct,
|
||||
wasIncoming: true,
|
||||
// We don't actually know, but it doesn't seem that important in this case,
|
||||
// but we could maybe plumb this info through RingRTC
|
||||
wasVideoCall: false,
|
||||
// Since the user didn't decline, make sure it shows up as a missed call instead
|
||||
wasDeclined: false,
|
||||
acceptedTime: undefined,
|
||||
endedTime,
|
||||
});
|
||||
let wasDeclined = false;
|
||||
let acceptedTime;
|
||||
|
||||
if (reason === CallEndedReason.AcceptedOnAnotherDevice) {
|
||||
acceptedTime = endedTime;
|
||||
} else if (reason === CallEndedReason.DeclinedOnAnotherDevice) {
|
||||
wasDeclined = true;
|
||||
}
|
||||
// Otherwise it will show up as a missed call.
|
||||
|
||||
conversation.addCallHistory(
|
||||
{
|
||||
callMode: CallMode.Direct,
|
||||
wasIncoming: true,
|
||||
wasVideoCall,
|
||||
wasDeclined,
|
||||
acceptedTime,
|
||||
endedTime,
|
||||
},
|
||||
receivedAtCounter
|
||||
);
|
||||
}
|
||||
|
||||
public async updateCallHistoryForGroupCall(
|
||||
|
|
|
@ -75,7 +75,7 @@ export type ActiveCallType = ActiveDirectCallType | ActiveGroupCallType;
|
|||
|
||||
// Must be kept in sync with RingRTC.CallState
|
||||
export enum CallState {
|
||||
Prering = 'init',
|
||||
Prering = 'idle',
|
||||
Ringing = 'ringing',
|
||||
Accepted = 'connected',
|
||||
Reconnecting = 'connecting',
|
||||
|
|
|
@ -13000,9 +13000,9 @@ rimraf@^3.0.0, rimraf@^3.0.2:
|
|||
dependencies:
|
||||
glob "^7.1.3"
|
||||
|
||||
"ringrtc@https://github.com/signalapp/signal-ringrtc-node.git#f25f900355bbd69821449a39ad88c5a1afdaaac3":
|
||||
version "2.17.0"
|
||||
resolved "https://github.com/signalapp/signal-ringrtc-node.git#f25f900355bbd69821449a39ad88c5a1afdaaac3"
|
||||
"ringrtc@https://github.com/signalapp/signal-ringrtc-node.git#f22009252bd3742f5b8a2761fe8f9c76a3bbc11d":
|
||||
version "2.17.2"
|
||||
resolved "https://github.com/signalapp/signal-ringrtc-node.git#f22009252bd3742f5b8a2761fe8f9c76a3bbc11d"
|
||||
|
||||
ripemd160@^2.0.0, ripemd160@^2.0.1:
|
||||
version "2.0.1"
|
||||
|
|
Loading…
Add table
Reference in a new issue