perf(matrix): trim secret env-var import path

This commit is contained in:
Vincent Koc
2026-04-08 07:05:33 +01:00
parent 31b0d97c33
commit f0f405cf47

View File

@@ -1,5 +1,4 @@
import { normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
const MATRIX_SCOPED_ENV_SUFFIXES = [
"HOMESERVER",
@@ -61,7 +60,7 @@ function decodeMatrixEnvAccountToken(token: string): string | undefined {
if (!char || !/[A-Z0-9]/.test(char)) {
return undefined;
}
decoded += normalizeLowercaseStringOrEmpty(char);
decoded += char.toLowerCase();
index += 1;
}
const normalized = normalizeOptionalAccountId(decoded);