mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 21:44:32 +00:00
refactor(security): unify gateway scope authorization flows
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { getChannelPlugin, normalizeChannelId } from "../../channels/plugins/index.js";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import { loadConfig } from "../../config/config.js";
|
||||
import { callGateway, randomIdempotencyKey } from "../../gateway/call.js";
|
||||
import { callGatewayLeastPrivilege, randomIdempotencyKey } from "../../gateway/call.js";
|
||||
import type { PollInput } from "../../polls.js";
|
||||
import { normalizePollInput } from "../../polls.js";
|
||||
import {
|
||||
@@ -151,7 +151,7 @@ async function callMessageGateway<T>(params: {
|
||||
params: Record<string, unknown>;
|
||||
}): Promise<T> {
|
||||
const gateway = resolveGatewayOptions(params.gateway);
|
||||
return await callGateway<T>({
|
||||
return await callGatewayLeastPrivilege<T>({
|
||||
url: gateway.url,
|
||||
token: gateway.token,
|
||||
method: params.method,
|
||||
|
||||
Reference in New Issue
Block a user