From 3d850d5eee503b58a886ef4ddb2c9f0c7fea4cbe Mon Sep 17 00:00:00 2001 From: "Marshall T. Rose" Date: Fri, 26 Apr 2024 15:04:00 -0400 Subject: [PATCH] Test #1421 on dev3 Looks good on `dev2` --- src/environment.ts | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/environment.ts b/src/environment.ts index 8318566c0..38c23a542 100644 --- a/src/environment.ts +++ b/src/environment.ts @@ -1,14 +1,23 @@ export const env = process.env.ENVIRONMENT ?? "local"; export const isDevelopment = env.startsWith("development") || env === "local"; +const useJaasPilot = isDevelopment && env !== "development2"; + +let vpaas = ""; +if (isDevelopment) { + if (useJaasPilot) { + vpaas = "vpaas-magic-cookie-41b5e4eb989e414cac4fe7f51400a1d7"; + } else { + vpaas = "vpaas-magic-cookie-cd4131ef77674a71b73411408226e232"; + } +} else if (env === "staging") { + vpaas = "vpaas-magic-cookie-520aa9362071418c8a8661950bc0a470"; +} else { + vpaas = "vpaas-magic-cookie-a4818bd762a044998d717b70ac734cfe"; +} + export const config = { - vpaas: isDevelopment - ? "vpaas-magic-cookie-41b5e4eb989e414cac4fe7f51400a1d7" - : env === "staging" - ? "vpaas-magic-cookie-520aa9362071418c8a8661950bc0a470" - : env === "local" - ? "vpaas-magic-cookie-cd4131ef77674a71b73411408226e232" - : "vpaas-magic-cookie-a4818bd762a044998d717b70ac734cfe", - webrtc_domain: isDevelopment ? "stage.8x8.vc" : "8x8.vc", + vpaas, + webrtc_domain: useJaasPilot ? "stage.8x8.vc" : "8x8.vc", }; export const isProduction = env === "production";