Skip to content

Commit 1221eb2

Browse files
authored
Enable the capability set provider migration for ServerBanSync (#1016)
1 parent e39642a commit 1221eb2

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

src/draupnirfactory/DraupnirProtectedRoomsSet.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import {
5757
MatrixRoomID,
5858
StringUserID,
5959
} from "@the-draupnir-project/matrix-basic-types";
60+
import { CapabilitySetProviderMigration } from "../protections/ConfigMigration/CapabilitySetProviderMigration";
6061

6162
const log = new Logger("DraupnirProtectedRoomsSet");
6263

@@ -137,15 +138,17 @@ async function makeProtectionsManager(
137138
return Ok(
138139
new StandardProtectionsManager(
139140
protectionsConfigResult.ok,
140-
new StandardProtectionCapabilityProviderSetConfig((description) =>
141-
Ok(
142-
new BotSDKRoomStateConfigBackend(
143-
client,
144-
managementRoom.toRoomIDOrAlias(),
145-
"me.marewolf.draupnir.set_capability_provider",
146-
description.name
147-
)
148-
)
141+
new StandardProtectionCapabilityProviderSetConfig(
142+
(description) =>
143+
Ok(
144+
new BotSDKRoomStateConfigBackend(
145+
client,
146+
managementRoom.toRoomIDOrAlias(),
147+
"me.marewolf.draupnir.set_capability_provider",
148+
description.name
149+
)
150+
),
151+
CapabilitySetProviderMigration
149152
),
150153
new MjolnirProtectionSettingsConfig((description) =>
151154
Ok(

src/protections/ConfigMigration/CapabilitySetProviderMigration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export async function serverBanSynchronisationCapabilityRename(
6565
}
6666
}
6767

68-
export const DefaultEnabledProtectionsMigration =
68+
export const CapabilitySetProviderMigration =
6969
new SchemedDataManager<CapabilityProviderConfig>([
7070
serverBanSynchronisationCapabilityRename,
7171
]);

0 commit comments

Comments
 (0)