Skip to content

Commit

Permalink
Forgot to start Draupnir listening in appservice.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Gnuxie committed Sep 19, 2024
1 parent 334aaa7 commit b52948b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/draupnirfactory/StandardDraupnirManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
// https://github.com/matrix-org/mjolnir
// </text>

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";
Expand Down Expand Up @@ -83,6 +88,7 @@ export class StandardDraupnirManager {
}
this.draupnir.set(clientUserID, draupnir.ok);
this.failedDraupnir.delete(clientUserID);
void Task(draupnir.ok.start());
return draupnir;
}

Expand Down

0 comments on commit b52948b

Please sign in to comment.