Update to the latest SignalService.proto

This commit is contained in:
Scott Nonnenberg
2025-02-11 08:20:14 +10:00
committed by GitHub
parent cf5dc4b940
commit d26d915a44
26 changed files with 464 additions and 536 deletions

View File

@@ -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;
}
}