mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 05:36:06 +00:00
Add more startup logging
This commit is contained in:
parent
b1fd36737f
commit
6018cd3ed3
@ -60,6 +60,7 @@ LogService.info("index", "Starting bot...");
|
||||
const joinedRooms = await client.getJoinedRooms();
|
||||
|
||||
// Ensure we're also joined to the rooms we're protecting
|
||||
LogService.info("index", "Resolving protected rooms...");
|
||||
for (const roomRef of config.protectedRooms) {
|
||||
const permalink = Permalinks.parseUrl(roomRef);
|
||||
if (!permalink.roomIdOrAlias) continue;
|
||||
@ -73,6 +74,7 @@ LogService.info("index", "Starting bot...");
|
||||
}
|
||||
|
||||
// Ensure we're also in the management room
|
||||
LogService.info("index", "Resolving management room...");
|
||||
const managementRoomId = await client.resolveRoom(config.managementRoom);
|
||||
if (!joinedRooms.includes(managementRoomId)) {
|
||||
config.managementRoom = await client.joinRoom(config.managementRoom);
|
||||
|
Loading…
Reference in New Issue
Block a user