Matrix-js: fix pnpm check typing regressions

This commit is contained in:
Gustavo Madeira Santana
2026-02-25 17:22:09 -05:00
parent 78354f14a5
commit 3c52124ca7
24 changed files with 123 additions and 117 deletions

View File

@@ -2,14 +2,6 @@ import { readMatrixMessages } from "../src/matrix/actions.js";
import { createMatrixClient, resolveMatrixAuth } from "../src/matrix/client.js";
import { installLiveHarnessRuntime, resolveLiveHarnessConfig } from "./live-common.js";
function toMessageText(msg: {
text: string | null;
body?: string | null;
fallbackBody?: string | null;
}): string {
return msg.text ?? msg.body ?? msg.fallbackBody ?? "";
}
async function main() {
const roomId = process.argv[2]?.trim();
if (!roomId) {
@@ -34,10 +26,10 @@ async function main() {
try {
const result = await readMatrixMessages(roomId, { client, limit });
const compact = result.messages.map((msg) => ({
id: msg.id,
id: msg.eventId,
sender: msg.sender,
ts: msg.timestamp,
text: toMessageText(msg),
text: msg.body ?? "",
}));
process.stdout.write(