Skip to content

Commit 1d413a1

Browse files
committed
Include confirmation prompt listener into draupnir.
`--no-confirm` prompts will not work without this.
1 parent a45d308 commit 1d413a1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Draupnir.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ import {
7777
StandardPresentationArgumentStream,
7878
} from "@the-draupnir-project/interface-manager";
7979
import { ManagementRoomDetail } from "./managementroom/ManagementRoomDetail";
80+
import {
81+
COMMAND_CONFIRMATION_LISTENER,
82+
makeConfirmationPromptListener,
83+
} from "./commands/interface-manager/MatrixPromptForConfirmation";
8084
const log = new Logger("Draupnir");
8185

8286
// webAPIS should not be included on the Draupnir class.
@@ -178,6 +182,14 @@ export class Draupnir implements Client, MatrixAdaptorContext {
178182
this.reactionHandler
179183
)
180184
);
185+
this.reactionHandler.on(
186+
COMMAND_CONFIRMATION_LISTENER,
187+
makeConfirmationPromptListener(
188+
this.commandRoomID,
189+
this.commandDispatcher,
190+
this.reactionHandler
191+
)
192+
);
181193
this.capabilityMessageRenderer = new DraupnirRendererMessageCollector(
182194
this.clientPlatform.toRoomMessageSender(),
183195
this.managementRoomID

0 commit comments

Comments
 (0)