feat(voice): add opt-in peer-to-peer calls and country rollouts (#3367)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-10 15:45:17 +02:00
1 parent e5a568acca
commit bef5e33eec
215 files changed
+15840 -2693

No files matched your search

+1
View File
@@ -205,6 +205,7 @@ export interface MasterConfig {
latitude: number;
longitude: number;
};
p2p_stun_urls?: Array<string>;
};
search: {
engine: 'elasticsearch' | 'meilisearch';
@@ -86,6 +86,7 @@ describe('buildNamedFluxerEnvOverrides', () => {
FLUXER_API_IP_BAN_EXEMPT_IPS: blank,
FLUXER_PASSKEY_ADDITIONAL_ALLOWED_ORIGINS: blank,
FLUXER_LIVEKIT_DEFAULT_REGION: blank,
FLUXER_VOICE_P2P_STUN_URLS: blank,
FLUXER_AUTH_BLUESKY_KEYS: blank,
FLUXER_EMAIL_FROM_NAME: blank,
FLUXER_EMAIL_REPLY_TO_EMAIL: blank,
@@ -146,6 +147,20 @@ describe('buildNamedFluxerEnvOverrides', () => {
});
});
test('maps the peer-to-peer STUN urls onto integrations.voice', () => {
expect(
buildNamedFluxerEnvOverrides({
FLUXER_VOICE_P2P_STUN_URLS: 'stun:stun.example.com:3478, stun:stun2.example.com:3478',
}),
).toEqual({
integrations: {
voice: {
p2p_stun_urls: ['stun:stun.example.com:3478', 'stun:stun2.example.com:3478'],
},
},
});
});
test('rejects malformed JSON for a JSON-shaped override', () => {
expect(() => buildNamedFluxerEnvOverrides({FLUXER_LIVEKIT_DEFAULT_REGION: '{bad'})).toThrow(
'FLUXER_LIVEKIT_DEFAULT_REGION must be valid JSON',
@@ -170,6 +170,7 @@ const NAMED_FLUXER_ENV_OVERRIDES: Record<string, NamedEnvOverride> = {
FLUXER_LIVEKIT_URL: {path: ['integrations', 'voice', 'url']},
FLUXER_LIVEKIT_INTERNAL_URL: {path: ['integrations', 'voice', 'internal_url']},
FLUXER_LIVEKIT_DEFAULT_REGION: {path: ['integrations', 'voice', 'default_region'], parse: parseJsonObject},
FLUXER_VOICE_P2P_STUN_URLS: {path: ['integrations', 'voice', 'p2p_stun_urls'], parse: parseCsv},
FLUXER_SEARCH_ENGINE: {path: ['integrations', 'search', 'engine']},
FLUXER_SEARCH_URL: {path: ['integrations', 'search', 'url']},
FLUXER_SEARCH_API_KEY: {path: ['integrations', 'search', 'api_key']},