fix(slack): wrap session key in backticks to prevent emoji shortcode parsing (openclaw#30266) thanks @pushkarsingh32

Verified:
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: pushkarsingh32 <29558481+pushkarsingh32@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
pushkarsingh32
2026-03-01 20:53:50 +05:30
committed by GitHub
parent ff563eef0f
commit 4ba0a4d4fb
3 changed files with 3 additions and 2 deletions

View File

@@ -1391,7 +1391,7 @@ describe("runReplyAgent response usage footer", () => {
const res = await createRun({ responseUsage: "full", sessionKey });
const payload = Array.isArray(res) ? res[0] : res;
expect(String(payload?.text ?? "")).toContain("Usage:");
expect(String(payload?.text ?? "")).toContain(`· session ${sessionKey}`);
expect(String(payload?.text ?? "")).toContain(`· session \`${sessionKey}\``);
});
it("does not append session key when responseUsage=tokens", async () => {

View File

@@ -605,7 +605,7 @@ export async function runReplyAgent(params: {
costConfig,
});
if (formatted && responseUsageMode === "full" && sessionKey) {
formatted = `${formatted} · session ${sessionKey}`;
formatted = `${formatted} · session \`${sessionKey}\``;
}
if (formatted) {
responseUsageLine = formatted;