From 5f7822563a9c9e625c0e2ba725a5f264d9decde8 Mon Sep 17 00:00:00 2001 From: Ian Macdonald Date: Sat, 14 May 2022 11:52:06 +0200 Subject: [PATCH] To aid debugging, don't redact strings when building for devprod. --- ts/util/privacy.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ts/util/privacy.ts b/ts/util/privacy.ts index 499c1ccd2..9085d5fe8 100644 --- a/ts/util/privacy.ts +++ b/ts/util/privacy.ts @@ -98,11 +98,9 @@ const removeNewlines = (text: string) => text.replace(/\r?\n|\r/g, ''); // redactSensitivePaths :: String -> String const redactSensitivePaths = redactPath(APP_ROOT_PATH); +const isDev = (process.env.NODE_APP_INSTANCE || '').startsWith('devprod'); + // redactAll :: String -> String -export const redactAll = compose( - redactSensitivePaths, - redactGroupIds, - redactSessionID, - redactSnodeIP, - redactServerUrl -); +export const redactAll = !isDev + ? compose(redactSensitivePaths, redactGroupIds, redactSessionID, redactSnodeIP, redactServerUrl) + : (text: string) => text;