mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:41:37 +00:00
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:
@@ -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");
|
||||
});
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user