Skip to content

Commit 9f872f7

Browse files
authored
Use stable prefixes for policy recommendations (#329)
They have been in the spec for ~3 years now and most mjolnirs should be able to handle them. Let's use the stable endpoint now, so that other moderation tools don't need to implement the legacy identifier to handle new bans at some point. Signed-off-by: Nicolas Werner <[email protected]>
1 parent b48904b commit 9f872f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/models/ListRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { MatrixGlob } from "matrix-bot-sdk";
1919
export const RECOMMENDATION_BAN = "m.ban";
2020
export const RECOMMENDATION_BAN_TYPES = [RECOMMENDATION_BAN, "org.matrix.mjolnir.ban"];
2121

22-
export function recommendationToStable(recommendation: string, unstable = true): string|null {
22+
export function recommendationToStable(recommendation: string, unstable = false): string|null {
2323
if (RECOMMENDATION_BAN_TYPES.includes(recommendation)) return unstable ? RECOMMENDATION_BAN_TYPES[RECOMMENDATION_BAN_TYPES.length - 1] : RECOMMENDATION_BAN;
2424
return null;
2525
}

0 commit comments

Comments
 (0)