mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Update to the latest SignalService.proto
This commit is contained in:
@@ -19,8 +19,8 @@ export function callingMessageToProto(
|
||||
opaque,
|
||||
}: CallingMessage,
|
||||
urgency?: CallMessageUrgency
|
||||
): Proto.ICallingMessage {
|
||||
let opaqueField: undefined | Proto.CallingMessage.IOpaque;
|
||||
): Proto.ICallMessage {
|
||||
let opaqueField: undefined | Proto.CallMessage.IOpaque;
|
||||
if (opaque) {
|
||||
opaqueField = {
|
||||
...opaque,
|
||||
@@ -38,7 +38,7 @@ export function callingMessageToProto(
|
||||
offer: offer
|
||||
? {
|
||||
...offer,
|
||||
callId: Long.fromValue(offer.callId),
|
||||
id: Long.fromValue(offer.callId),
|
||||
type: offer.type as number,
|
||||
opaque: bufferToProto(offer.opaque),
|
||||
}
|
||||
@@ -46,11 +46,11 @@ export function callingMessageToProto(
|
||||
answer: answer
|
||||
? {
|
||||
...answer,
|
||||
callId: Long.fromValue(answer.callId),
|
||||
id: Long.fromValue(answer.callId),
|
||||
opaque: bufferToProto(answer.opaque),
|
||||
}
|
||||
: undefined,
|
||||
iceCandidates: iceCandidates
|
||||
iceUpdate: iceCandidates
|
||||
? iceCandidates.map(candidate => {
|
||||
return {
|
||||
...candidate,
|
||||
@@ -62,13 +62,13 @@ export function callingMessageToProto(
|
||||
busy: busy
|
||||
? {
|
||||
...busy,
|
||||
callId: Long.fromValue(busy.callId),
|
||||
id: Long.fromValue(busy.callId),
|
||||
}
|
||||
: undefined,
|
||||
hangup: hangup
|
||||
? {
|
||||
...hangup,
|
||||
callId: Long.fromValue(hangup.callId),
|
||||
id: Long.fromValue(hangup.callId),
|
||||
type: hangup.type as number,
|
||||
}
|
||||
: undefined,
|
||||
@@ -92,14 +92,14 @@ function bufferToProto(
|
||||
|
||||
function urgencyToProto(
|
||||
urgency: CallMessageUrgency
|
||||
): Proto.CallingMessage.Opaque.Urgency {
|
||||
): Proto.CallMessage.Opaque.Urgency {
|
||||
switch (urgency) {
|
||||
case CallMessageUrgency.Droppable:
|
||||
return Proto.CallingMessage.Opaque.Urgency.DROPPABLE;
|
||||
return Proto.CallMessage.Opaque.Urgency.DROPPABLE;
|
||||
case CallMessageUrgency.HandleImmediately:
|
||||
return Proto.CallingMessage.Opaque.Urgency.HANDLE_IMMEDIATELY;
|
||||
return Proto.CallMessage.Opaque.Urgency.HANDLE_IMMEDIATELY;
|
||||
default:
|
||||
log.error(missingCaseError(urgency));
|
||||
return Proto.CallingMessage.Opaque.Urgency.DROPPABLE;
|
||||
return Proto.CallMessage.Opaque.Urgency.DROPPABLE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user