fix: test type error (await renderPresentation) and lint (remove ?? {} in spread)

This commit is contained in:
OpenClaw Agent
2026-04-28 13:55:52 +08:00
committed by Peter Steinberger
parent 2f826ce188
commit ada2ff35c0
2 changed files with 3 additions and 3 deletions

View File

@@ -170,7 +170,7 @@ describe("matrixOutbound cfg threading", () => {
);
});
it("renders MessagePresentation into Matrix custom content metadata", () => {
it("renders MessagePresentation into Matrix custom content metadata", async () => {
const presentation = {
title: "Select thinking level",
tone: "info" as const,
@@ -185,7 +185,7 @@ describe("matrixOutbound cfg threading", () => {
],
};
const rendered = matrixOutbound.renderPresentation!({
const rendered = await matrixOutbound.renderPresentation!({
payload: { text: "fallback", presentation },
presentation,
ctx: {} as never,

View File

@@ -51,7 +51,7 @@ function renderMatrixPresentationPayload(params: {
matrix: {
...matrixData,
extraContent: {
...(matrixData.extraContent ?? {}),
...matrixData.extraContent,
[MATRIX_OPENCLAW_PRESENTATION_KEY]: buildMatrixPresentationContent(params.presentation),
},
},