mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00
Don't set global displayname for bot in generic hooks (#215)
* Don't set global displayname for bot in generic hooks * Create 215.bugfix
This commit is contained in:
parent
1795b86e7b
commit
6b52457274
1
changelog.d/215.bugfix
Normal file
1
changelog.d/215.bugfix
Normal file
@ -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.
|
@ -137,6 +137,10 @@ export class GenericHookConnection extends BaseConnection implements IConnection
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const sender = this.getUserId();
|
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 intent = this.as.getIntentForUserId(sender);
|
||||||
const expectedDisplayname = `${this.state.name} (Webhook)`;
|
const expectedDisplayname = `${this.state.name} (Webhook)`;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user