Fix getBytesForPeerId logging warning

This commit is contained in:
Jamie
2026-03-16 11:47:45 -07:00
committed by GitHub
parent 178e93924f
commit 41da8af0b5

View File

@@ -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(