Change list creation command to also protect the new room

https://github.com/matrix-org/mjolnir/issues/370
This commit is contained in:
gnuxie 2022-10-14 19:36:31 +01:00 committed by Gnuxie
parent 97673cdccb
commit 5c2e4ab0bb

View File

@ -32,6 +32,7 @@ export async function execCreateListCommand(roomId: string, event: any, mjolnir:
const roomRef = Permalinks.forRoom(listRoomId); const roomRef = Permalinks.forRoom(listRoomId);
await mjolnir.watchList(roomRef); await mjolnir.watchList(roomRef);
await mjolnir.addProtectedRoom(listRoomId);
const html = `Created new list (<a href="${roomRef}">${listRoomId}</a>). This list is now being watched.`; const html = `Created new list (<a href="${roomRef}">${listRoomId}</a>). This list is now being watched.`;
const text = `Created new list (${roomRef}). This list is now being watched.`; const text = `Created new list (${roomRef}). This list is now being watched.`;