From 5c1cdfd24f4344bbc011a69b69979bfd5695e9aa Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 29 Jan 2026 08:03:01 -0600 Subject: add redact for overlay --- src/slskd/Core/Extensions.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/slskd/Core/Extensions.cs b/src/slskd/Core/Extensions.cs index db75cc9c..707daa88 100644 --- a/src/slskd/Core/Extensions.cs +++ b/src/slskd/Core/Extensions.cs @@ -41,6 +41,21 @@ namespace slskd return redacted; } + /// + /// Redacts this instance of Options, replacing properties marked with with '*****'. + /// + /// + /// Creates a deep clone before redacting. + /// + /// The Options instance to redact. + /// A redacted instance. + public static OptionsOverlay Redact(this OptionsOverlay options) + { + var redacted = options.ToJson().FromJson(); + Redactor.Redact(redacted, redactWith: "*****"); + return redacted; + } + /// /// Creates a copy of this instance with the specified parameters changed. /// -- cgit v1.2.3