mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 09:11:12 +00:00
refactor: dedupe agent and browser cli helpers
This commit is contained in:
@@ -89,9 +89,14 @@ export async function handleTelegramAction(
|
||||
mediaLocalRoots?: readonly string[];
|
||||
},
|
||||
): Promise<AgentToolResult<unknown>> {
|
||||
const action = readStringParam(params, "action", { required: true });
|
||||
const accountId = readStringParam(params, "accountId");
|
||||
const isActionEnabled = createTelegramActionGate({ cfg, accountId });
|
||||
const { action, accountId } = {
|
||||
action: readStringParam(params, "action", { required: true }),
|
||||
accountId: readStringParam(params, "accountId"),
|
||||
};
|
||||
const isActionEnabled = createTelegramActionGate({
|
||||
cfg,
|
||||
accountId,
|
||||
});
|
||||
|
||||
if (action === "react") {
|
||||
// All react failures return soft results (jsonResult with ok:false) instead
|
||||
|
||||
Reference in New Issue
Block a user