Merge pull request #326 from pangeachat/power-level-hotfix
remove setting of bot power on invite
This commit is contained in:
commit
7db9a33b29
1 changed files with 0 additions and 18 deletions
|
|
@ -248,29 +248,11 @@ class PangeaController {
|
|||
if (!userIds.contains(BotName.byEnvironment)) {
|
||||
try {
|
||||
await space.invite(BotName.byEnvironment);
|
||||
await space.postLoad();
|
||||
await space.setPower(
|
||||
BotName.byEnvironment,
|
||||
ClassDefaultValues.powerLevelOfAdmin,
|
||||
);
|
||||
} catch (err) {
|
||||
ErrorHandler.logError(
|
||||
e: "Failed to invite pangea bot to space ${space.id}",
|
||||
);
|
||||
}
|
||||
} else if (space.getPowerLevelByUserId(BotName.byEnvironment) <
|
||||
ClassDefaultValues.powerLevelOfAdmin) {
|
||||
try {
|
||||
await space.postLoad();
|
||||
await space.setPower(
|
||||
BotName.byEnvironment,
|
||||
ClassDefaultValues.powerLevelOfAdmin,
|
||||
);
|
||||
} catch (err) {
|
||||
ErrorHandler.logError(
|
||||
e: "Failed to reset power level for pangea bot in space ${space.id}",
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue