Properly style call buttons across app, when already in a call

This commit is contained in:
Scott Nonnenberg 2024-08-27 06:48:41 +10:00 committed by GitHub
parent 3c25092f50
commit c251867699
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 610 additions and 189 deletions

View file

@ -28,7 +28,11 @@ import {
} from './zkgroup';
import { getCheckedCallLinkAuthCredentialsForToday } from '../services/groupCredentialFetcher';
import * as durations from './durations';
import { fromAdminKeyBytes, toAdminKeyBytes } from './callLinks';
import {
fromAdminKeyBytes,
getKeyFromCallLink,
toAdminKeyBytes,
} from './callLinks';
/**
* RingRTC conversions
@ -64,6 +68,12 @@ export function getCallLinkRootKeyFromUrlKey(key: string): Uint8Array {
return CallLinkRootKey.parse(key).bytes;
}
export function getRoomIdFromCallLink(url: string): string {
const keyString = getKeyFromCallLink(url);
const key = CallLinkRootKey.parse(keyString);
return getRoomIdFromRootKey(key);
}
export async function getCallLinkAuthCredentialPresentation(
callLinkRootKey: CallLinkRootKey
): Promise<CallLinkAuthCredentialPresentation> {