Skip to content

Commit d966aed

Browse files
authored
Merge pull request #734 from the-draupnir-project/gnuxie/room-unban-fixing
Improve the unban command and add previews via a new `--no-confirm` option.
2 parents 9587d6f + 1d413a1 commit d966aed

File tree

9 files changed

+1082
-268
lines changed

9 files changed

+1082
-268
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

src/commands/DraupnirCommands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import { DraupnirDisplaynameCommand } from "./SetDisplayNameCommand";
4545
import { DraupnirSetPowerLevelCommand } from "./SetPowerLevelCommand";
4646
import { SynapseAdminShutdownRoomCommand } from "./ShutdownRoomCommand";
4747
import { DraupnirStatusCommand } from "./StatusCommand";
48-
import { DraupnirUnbanCommand } from "./Unban";
48+
import { DraupnirUnbanCommand } from "./unban/Unban";
4949
import {
5050
DraupnirUnwatchPolicyRoomCommand,
5151
DraupnirWatchPolicyRoomCommand,

src/commands/Unban.ts

Lines changed: 0 additions & 261 deletions
This file was deleted.

0 commit comments

Comments
 (0)