From b52948b353f54841d4190325d905ed6765e5bb4e Mon Sep 17 00:00:00 2001 From: gnuxie Date: Thu, 19 Sep 2024 12:27:39 +0100 Subject: [PATCH] Forgot to start Draupnir listening in appservice. We need to look at Draupnir's .start method and make it `void`. The report poller should just throw if it fails without being caught by `Task`. We also need to test the `toggle` in appservice in integration tests. --- src/draupnirfactory/StandardDraupnirManager.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/draupnirfactory/StandardDraupnirManager.ts b/src/draupnirfactory/StandardDraupnirManager.ts index c811cb2f..562de992 100644 --- a/src/draupnirfactory/StandardDraupnirManager.ts +++ b/src/draupnirfactory/StandardDraupnirManager.ts @@ -8,7 +8,12 @@ // https://github.com/matrix-org/mjolnir // -import { ActionError, ActionResult, isError } from "matrix-protection-suite"; +import { + ActionError, + ActionResult, + Task, + isError, +} from "matrix-protection-suite"; import { IConfig } from "../config"; import { DraupnirFactory } from "./DraupnirFactory"; import { Draupnir } from "../Draupnir"; @@ -83,6 +88,7 @@ export class StandardDraupnirManager { } this.draupnir.set(clientUserID, draupnir.ok); this.failedDraupnir.delete(clientUserID); + void Task(draupnir.ok.start()); return draupnir; }