From 46e1008942004c83a104e78ef2a6bbf8fa759abb Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Fri, 17 Mar 2023 15:05:04 +0100 Subject: [PATCH] Fix widget config detection (#657) Co-authored-by: Will Hunt --- changelog.d/657.bugfix | 1 + src/Connections/SetupConnection.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/657.bugfix diff --git a/changelog.d/657.bugfix b/changelog.d/657.bugfix new file mode 100644 index 00000000..585e3a84 --- /dev/null +++ b/changelog.d/657.bugfix @@ -0,0 +1 @@ +`roomSetupWidget` in widget config does now allow an empty value diff --git a/src/Connections/SetupConnection.ts b/src/Connections/SetupConnection.ts index 7ac78e02..fb8f8790 100644 --- a/src/Connections/SetupConnection.ts +++ b/src/Connections/SetupConnection.ts @@ -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)) {