mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 09:02:45 +00:00
fix(hooks): decouple message:sent internal hook from mirror param
(cherry picked from commit 1afd7030f8)
This commit is contained in:
committed by
Peter Steinberger
parent
c7bf0dacb8
commit
01c1f68ab3
@@ -216,6 +216,8 @@ type DeliverOutboundPayloadsCoreParams = {
|
||||
mediaUrls?: string[];
|
||||
};
|
||||
silent?: boolean;
|
||||
/** Session key for internal hook dispatch (when `mirror` is not needed). */
|
||||
sessionKey?: string;
|
||||
};
|
||||
|
||||
type DeliverOutboundPayloadsParams = DeliverOutboundPayloadsCoreParams & {
|
||||
@@ -444,7 +446,7 @@ async function deliverOutboundPayloadsCore(
|
||||
return normalized ? [normalized] : [];
|
||||
});
|
||||
const hookRunner = getGlobalHookRunner();
|
||||
const sessionKeyForInternalHooks = params.mirror?.sessionKey;
|
||||
const sessionKeyForInternalHooks = params.mirror?.sessionKey ?? params.sessionKey;
|
||||
for (const payload of normalizedPayloads) {
|
||||
const payloadSummary: NormalizedOutboundPayload = {
|
||||
text: payload.text ?? "",
|
||||
|
||||
Reference in New Issue
Block a user