mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
chore: remove redundant discord smoke conversions
This commit is contained in:
@@ -429,18 +429,14 @@ function resolveCandidateBindings(params: {
|
||||
const normalizedTargetAgent = params.targetAgent.trim().toLowerCase();
|
||||
return params.entries
|
||||
.filter((entry) => {
|
||||
const targetKind = String(entry.targetKind || "")
|
||||
.trim()
|
||||
.toLowerCase();
|
||||
const targetKind = (entry.targetKind || "").trim().toLowerCase();
|
||||
if (targetKind !== "acp") {
|
||||
return false;
|
||||
}
|
||||
if (normalizeBoundAt(entry) < params.minBoundAt) {
|
||||
return false;
|
||||
}
|
||||
const agentId = String(entry.agentId || "")
|
||||
.trim()
|
||||
.toLowerCase();
|
||||
const agentId = (entry.agentId || "").trim().toLowerCase();
|
||||
if (normalizedTargetAgent && agentId && agentId !== normalizedTargetAgent) {
|
||||
return false;
|
||||
}
|
||||
@@ -663,7 +659,7 @@ async function run(): Promise<SuccessResult | FailureResult> {
|
||||
"--json",
|
||||
],
|
||||
});
|
||||
sentMessageId = String(sent.payload?.result?.messageId || "");
|
||||
sentMessageId = sent.payload?.result?.messageId || "";
|
||||
if (!sentMessageId) {
|
||||
throw new Error("openclaw message send did not return payload.result.messageId");
|
||||
}
|
||||
@@ -794,8 +790,8 @@ async function run(): Promise<SuccessResult | FailureResult> {
|
||||
binding: {
|
||||
threadId,
|
||||
targetSessionKey: winningBinding.targetSessionKey,
|
||||
targetKind: String(winningBinding.targetKind || "acp"),
|
||||
agentId: String(winningBinding.agentId || args.targetAgent),
|
||||
targetKind: winningBinding.targetKind || "acp",
|
||||
agentId: winningBinding.agentId || args.targetAgent,
|
||||
boundAt: normalizeBoundAt(winningBinding),
|
||||
accountId: winningBinding.accountId,
|
||||
channelId: winningBinding.channelId,
|
||||
|
||||
Reference in New Issue
Block a user