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