mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-02 00:07:56 +01:00
Fix getBytesForPeerId logging warning
Co-authored-by: Jamie <113370520+jamiebuilds-signal@users.noreply.github.com>
This commit is contained in:
@@ -355,14 +355,16 @@ function shouldSyncStatus(callStatus: CallStatus) {
|
||||
// call link peerId. Locally conversationId is Base64 encoded but roomIds
|
||||
// are hex encoded.
|
||||
export function getBytesForPeerId(callHistory: CallHistoryDetails): Uint8Array {
|
||||
let peerId =
|
||||
callHistory.mode === CallMode.Adhoc
|
||||
? Bytes.fromHex(callHistory.peerId)
|
||||
: uuidToBytes(callHistory.peerId);
|
||||
if (peerId.length === 0) {
|
||||
peerId = Bytes.fromBase64(callHistory.peerId);
|
||||
if (callHistory.mode === CallMode.Adhoc) {
|
||||
return Bytes.fromHex(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(
|
||||
|
||||
Reference in New Issue
Block a user