From 92bbfe1b083b39cbbf978170f8c422147695f2e4 Mon Sep 17 00:00:00 2001 From: VivoKrei Date: Wed, 18 Mar 2026 18:17:13 -0400 Subject: [PATCH] fix(nextcloud-talk): fix onMessage return type in live integration tests Array.push() returns number, not void. Wrap in block to satisfy void | Promise constraint. --- .../src/monitor.live-integration.test.ts | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/extensions/nextcloud-talk/src/monitor.live-integration.test.ts b/extensions/nextcloud-talk/src/monitor.live-integration.test.ts index ee0f23e1752..754754c724d 100644 --- a/extensions/nextcloud-talk/src/monitor.live-integration.test.ts +++ b/extensions/nextcloud-talk/src/monitor.live-integration.test.ts @@ -42,7 +42,9 @@ describe("live integration: NC Talk attachment parsing pipeline", () => { const h = await startWebhookServer({ path: "/live-1", secret: SECRET, - onMessage: async (m) => msgs.push(m), + onMessage: async (m) => { + msgs.push(m); + }, }); const content = JSON.stringify({ message: "{file}", @@ -68,7 +70,9 @@ describe("live integration: NC Talk attachment parsing pipeline", () => { const h = await startWebhookServer({ path: "/live-2", secret: SECRET, - onMessage: async (m) => msgs.push(m), + onMessage: async (m) => { + msgs.push(m); + }, }); const content = JSON.stringify({ message: "{mention} sent a message", @@ -85,7 +89,9 @@ describe("live integration: NC Talk attachment parsing pipeline", () => { const h = await startWebhookServer({ path: "/live-3", secret: SECRET, - onMessage: async (m) => msgs.push(m), + onMessage: async (m) => { + msgs.push(m); + }, }); const { body, headers } = signed({ content: "Hello from Alice", name: "Hello from Alice" }); await fetch(h.webhookUrl, { method: "POST", headers, body }); @@ -98,7 +104,9 @@ describe("live integration: NC Talk attachment parsing pipeline", () => { const h = await startWebhookServer({ path: "/live-4", secret: SECRET, - onMessage: async (m) => msgs.push(m), + onMessage: async (m) => { + msgs.push(m); + }, }); const content = JSON.stringify({ message: "{file}", @@ -124,7 +132,9 @@ describe("live integration: NC Talk attachment parsing pipeline", () => { const h = await startWebhookServer({ path: "/live-5", secret: SECRET, - onMessage: async (m) => msgs.push(m), + onMessage: async (m) => { + msgs.push(m); + }, }); const content = JSON.stringify({ message: "{f1} and {f2}",