Fix widget config detection (#657)

Co-authored-by: Will Hunt <will@half-shot.uk>
This commit is contained in:
Michael Weimann 2023-03-17 15:05:04 +01:00 committed by GitHub
parent 0d0cc6b3da
commit 46e1008942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/657.bugfix Normal file
View File

@ -0,0 +1 @@
`roomSetupWidget` in widget config does now allow an empty value

View File

@ -324,7 +324,7 @@ export class SetupConnection extends CommandConnection {
@botCommand("setup-widget", {category: "widget", help: "Open the setup widget in the room"})
public async onSetupWidget() {
if (!this.config.widgets?.roomSetupWidget) {
if (this.config.widgets?.roomSetupWidget === undefined) {
throw new CommandError("Not configured", "The bridge is not configured to support setup widgets");
}
if (!await SetupWidget.SetupRoomConfigWidget(this.roomId, this.intent, this.config.widgets, this.serviceTypes)) {