chore: Lint extensions folder.

This commit is contained in:
cpojer
2026-01-31 22:13:48 +09:00
parent 4f2166c503
commit 230ca789e2
221 changed files with 4006 additions and 1583 deletions

View File

@@ -62,7 +62,9 @@ export async function executeZalouserTool(
throw new Error("threadId and message required for send action");
}
const args = ["msg", "send", params.threadId, params.message];
if (params.isGroup) args.push("-g");
if (params.isGroup) {
args.push("-g");
}
const result = await runZca(args, { profile: params.profile });
if (!result.ok) {
throw new Error(result.stderr || "Failed to send message");
@@ -78,8 +80,12 @@ export async function executeZalouserTool(
throw new Error("url required for image action");
}
const args = ["msg", "image", params.threadId, "-u", params.url];
if (params.message) args.push("-m", params.message);
if (params.isGroup) args.push("-g");
if (params.message) {
args.push("-m", params.message);
}
if (params.isGroup) {
args.push("-g");
}
const result = await runZca(args, { profile: params.profile });
if (!result.ok) {
throw new Error(result.stderr || "Failed to send image");
@@ -92,7 +98,9 @@ export async function executeZalouserTool(
throw new Error("threadId and url required for link action");
}
const args = ["msg", "link", params.threadId, params.url];
if (params.isGroup) args.push("-g");
if (params.isGroup) {
args.push("-g");
}
const result = await runZca(args, { profile: params.profile });
if (!result.ok) {
throw new Error(result.stderr || "Failed to send link");
@@ -142,10 +150,12 @@ export async function executeZalouserTool(
});
}
default:
default: {
params.action satisfies never;
throw new Error(
`Unknown action: ${params.action}. Valid actions: send, image, link, friends, groups, me, status`,
`Unknown action: ${String(params.action)}. Valid actions: send, image, link, friends, groups, me, status`,
);
}
}
} catch (err) {
return json({