mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 05:02:44 +00:00
fix: scope history injection to pending-only
This commit is contained in:
@@ -77,17 +77,15 @@ export async function maybeBroadcastMessage(params: {
|
||||
}
|
||||
};
|
||||
|
||||
let didSendReply = false;
|
||||
if (strategy === "sequential") {
|
||||
for (const agentId of broadcastAgents) {
|
||||
if (await processForAgent(agentId)) didSendReply = true;
|
||||
await processForAgent(agentId);
|
||||
}
|
||||
} else {
|
||||
const results = await Promise.allSettled(broadcastAgents.map(processForAgent));
|
||||
didSendReply = results.some((result) => result.status === "fulfilled" && result.value);
|
||||
await Promise.allSettled(broadcastAgents.map(processForAgent));
|
||||
}
|
||||
|
||||
if (params.msg.chatType === "group" && didSendReply) {
|
||||
if (params.msg.chatType === "group") {
|
||||
params.groupHistories.set(params.groupHistoryKey, []);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user