diff --git a/changelog.d/215.bugfix b/changelog.d/215.bugfix new file mode 100644 index 00000000..c7a57354 --- /dev/null +++ b/changelog.d/215.bugfix @@ -0,0 +1 @@ +Fixed an issue where the bridge bot would change it's displayname if a webhook event is handled while `generic.userIdPrefix` is not set in the config. diff --git a/src/Connections/GenericHook.ts b/src/Connections/GenericHook.ts index c28c290e..0318dbf7 100644 --- a/src/Connections/GenericHook.ts +++ b/src/Connections/GenericHook.ts @@ -137,6 +137,10 @@ export class GenericHookConnection extends BaseConnection implements IConnection return; } const sender = this.getUserId(); + if (sender === this.as.botUserId) { + // Don't set the global displayname for the bot. + return; + } const intent = this.as.getIntentForUserId(sender); const expectedDisplayname = `${this.state.name} (Webhook)`;