fix(signal): preserve case for group IDs (base64 is case-sensitive)
fix(windows): add shell option for spawn on Windows to fix npm ENOENT Fixes #4537, Fixes #4557
This commit is contained in:
parent
bc432d8435
commit
aaefee78de
@ -8,21 +8,23 @@ export function normalizeSignalMessagingTarget(raw: string): string | undefined
|
||||
if (!normalized) return undefined;
|
||||
const lower = normalized.toLowerCase();
|
||||
if (lower.startsWith("group:")) {
|
||||
// Preserve case for group IDs - base64 is case-sensitive
|
||||
const id = normalized.slice("group:".length).trim();
|
||||
return id ? `group:${id}`.toLowerCase() : undefined;
|
||||
return id ? `group:${id}` : undefined;
|
||||
}
|
||||
if (lower.startsWith("username:")) {
|
||||
const id = normalized.slice("username:".length).trim();
|
||||
return id ? `username:${id}`.toLowerCase() : undefined;
|
||||
return id ? `username:${id.toLowerCase()}` : undefined;
|
||||
}
|
||||
if (lower.startsWith("u:")) {
|
||||
const id = normalized.slice("u:".length).trim();
|
||||
return id ? `username:${id}`.toLowerCase() : undefined;
|
||||
return id ? `username:${id.toLowerCase()}` : undefined;
|
||||
}
|
||||
if (lower.startsWith("uuid:")) {
|
||||
const id = normalized.slice("uuid:".length).trim();
|
||||
return id ? id.toLowerCase() : undefined;
|
||||
}
|
||||
// Phone numbers and other targets can be lowercased
|
||||
return normalized.toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
@ -85,6 +85,7 @@ export async function runCommandWithTimeout(
|
||||
cwd,
|
||||
env: resolvedEnv,
|
||||
windowsVerbatimArguments,
|
||||
shell: process.platform === "win32",
|
||||
});
|
||||
// Spawn with inherited stdin (TTY) so tools like `pi` stay interactive when needed.
|
||||
return await new Promise((resolve, reject) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user