mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-23 01:48:13 +01:00
RingRTC: Conversions from Buffer->Uint8Array
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { CallLinkRootKey } from '@signalapp/ringrtc';
|
||||
import * as Bytes from '../../Bytes';
|
||||
import type {
|
||||
CallLinkRecord,
|
||||
CallLinkStateType,
|
||||
@@ -221,9 +222,9 @@ export function updateCallLinkAdminKeyByRoomId(
|
||||
}
|
||||
|
||||
function assertRoomIdMatchesRootKey(roomId: string, rootKey: string): void {
|
||||
const derivedRoomId = CallLinkRootKey.parse(rootKey)
|
||||
.deriveRoomId()
|
||||
.toString('hex');
|
||||
const derivedRoomId = Bytes.toHex(
|
||||
CallLinkRootKey.parse(rootKey).deriveRoomId()
|
||||
);
|
||||
strictAssert(
|
||||
roomId === derivedRoomId,
|
||||
'passed roomId must match roomId derived from root key'
|
||||
|
||||
Reference in New Issue
Block a user