fix(gateway): use normalizeMessageChannel for send validation to supp… · openclaw/openclaw@5881dc8
bladin
·
2026-06-25
·
via Recent Commits to openclaw:main
File tree
src/gateway/server-methods
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ import {
|
15 | 15 | } from "../../../packages/gateway-protocol/src/index.js"; |
16 | 16 | import { resolveSessionAgentId } from "../../agents/agent-scope.js"; |
17 | 17 | import { sendDurableMessageBatch } from "../../channels/message/runtime.js"; |
18 | | -import { normalizeChannelId } from "../../channels/plugins/index.js"; |
| 18 | +import { normalizeMessageChannel } from "../../utils/message-channel.js"; |
19 | 19 | import { dispatchChannelMessageAction } from "../../channels/plugins/message-action-dispatch.js"; |
20 | 20 | import { createOutboundSendDeps } from "../../cli/deps.js"; |
21 | 21 | import { |
@@ -177,7 +177,7 @@ async function resolveRequestedChannel(params: {
|
177 | 177 | } |
178 | 178 | > { |
179 | 179 | const channelInput = readStringValue(params.requestChannel); |
180 | | -const normalizedChannel = channelInput ? normalizeChannelId(channelInput) : null; |
| 180 | +const normalizedChannel = channelInput ? normalizeMessageChannel(channelInput) : undefined; |
181 | 181 | if (channelInput && !normalizedChannel) { |
182 | 182 | const normalizedInput = normalizeOptionalLowercaseString(channelInput) ?? ""; |
183 | 183 | if (params.rejectWebchatAsInternalOnly && normalizedInput === "webchat") { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。