mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-17 23:34:14 +01:00
Fix getBytesForPeerId logging warning
This commit is contained in:
@@ -355,14 +355,16 @@ function shouldSyncStatus(callStatus: CallStatus) {
|
|||||||
// call link peerId. Locally conversationId is Base64 encoded but roomIds
|
// call link peerId. Locally conversationId is Base64 encoded but roomIds
|
||||||
// are hex encoded.
|
// are hex encoded.
|
||||||
export function getBytesForPeerId(callHistory: CallHistoryDetails): Uint8Array {
|
export function getBytesForPeerId(callHistory: CallHistoryDetails): Uint8Array {
|
||||||
let peerId =
|
if (callHistory.mode === CallMode.Adhoc) {
|
||||||
callHistory.mode === CallMode.Adhoc
|
return Bytes.fromHex(callHistory.peerId);
|
||||||
? Bytes.fromHex(callHistory.peerId)
|
|
||||||
: uuidToBytes(callHistory.peerId);
|
|
||||||
if (peerId.length === 0) {
|
|
||||||
peerId = Bytes.fromBase64(callHistory.peerId);
|
|
||||||
}
|
}
|
||||||
return peerId;
|
if (callHistory.mode === CallMode.Group) {
|
||||||
|
return Bytes.fromBase64(callHistory.peerId);
|
||||||
|
}
|
||||||
|
if (callHistory.mode === CallMode.Direct) {
|
||||||
|
return uuidToBytes(callHistory.peerId);
|
||||||
|
}
|
||||||
|
throw missingCaseError(callHistory.mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCallIdForProto(
|
export function getCallIdForProto(
|
||||||
|
|||||||
Reference in New Issue
Block a user