mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-08-20 01:19:43 +00:00
Docker Hub - Develop / docker-latest (push) Canceled after 0s
GHCR - Development Branches / ghcr-publish (push) Canceled after 0s
Tests / Build & Lint (push) Canceled after 0s
Tests / Unit tests (push) Canceled after 0s
Tests / Integration tests (push) Canceled after 0s
Tests / Application Service Integration tests (push) Canceled after 0s
Validate Docker Build / validate-docker-build (push) Canceled after 0s
* Remove old matrix-protection-suite package aliases. This was leading to issues with monorepo package management. https://github.com/the-draupnir-project/Draupnir/issues/1124 * Fix badly imported symbols from packages that already export them. * Cleanup build command arguments. There was a deprecation warning for short workspaces flag.
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
// Copyright 2022 - 2024 Gnuxie <Gnuxie@protonmail.com>
|
|
// Copyright 2021 - 2022 The Matrix.org Foundation C.I.C.
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
// SPDX-FileAttributionText: <text>
|
|
// This modified file incorporates work from mjolnir
|
|
// https://github.com/matrix-org/mjolnir
|
|
// </text>
|
|
|
|
/**
|
|
* This file is used to launch mjolnir for manual testing, creating a user and management room automatically if it doesn't already exist.
|
|
*/
|
|
|
|
import { draupnirClient, makeBotModeToggle } from "./mjolnirSetupUtils";
|
|
import { configRead, getStoragePath } from "../../src/config";
|
|
import { DefaultEventDecoder } from "@the-draupnir-project/matrix-protection-suite";
|
|
import { makeTopLevelStores } from "../../src/backingstore/DraupnirStores";
|
|
|
|
void (async () => {
|
|
const config = configRead();
|
|
const storagePath = getStoragePath(config.dataPath);
|
|
const toggle = await makeBotModeToggle(config, {
|
|
stores: makeTopLevelStores(storagePath, DefaultEventDecoder, {
|
|
isRoomStateBackingStoreEnabled:
|
|
config.roomStateBackingStore.enabled ?? false,
|
|
}),
|
|
allowSafeMode: true,
|
|
deleteManagementRoomAliasOnStart: false,
|
|
});
|
|
await draupnirClient()?.start();
|
|
await toggle.encryptionInitialized();
|
|
})();
|