fix(inbound-meta): land #30984 include account_id context (@Stxle2)

Landed from contributor PR #30984 by @Stxle2.

Co-authored-by: Stxle2 <166609401+Stxle2@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-03-02 03:36:40 +00:00
parent c13b35b83d
commit 0202d79df4
3 changed files with 4 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ describe("buildInboundMetaSystemPrompt", () => {
MessageSidFull: "123",
ReplyToId: "99",
OriginatingTo: "telegram:5494292670",
AccountId: " work ",
OriginatingChannel: "telegram",
Provider: "telegram",
Surface: "telegram",
@@ -34,6 +35,7 @@ describe("buildInboundMetaSystemPrompt", () => {
const payload = parseInboundMetaPayload(prompt);
expect(payload["schema"]).toBe("openclaw.inbound_meta.v1");
expect(payload["chat_id"]).toBe("telegram:5494292670");
expect(payload["account_id"]).toBe("work");
expect(payload["channel"]).toBe("telegram");
});

View File

@@ -60,6 +60,7 @@ export function buildInboundMetaSystemPrompt(ctx: TemplateContext): string {
const payload = {
schema: "openclaw.inbound_meta.v1",
chat_id: safeTrim(ctx.OriginatingTo),
account_id: safeTrim(ctx.AccountId),
channel: channelValue,
provider: safeTrim(ctx.Provider),
surface: safeTrim(ctx.Surface),