feat: make webhook display name suffix configurable#1257
Open
ornariece wants to merge 2 commits into
Open
Conversation
Add `generic.displaynameSuffix` config option to control the suffix
appended to webhook virtual user display names. Defaults to " (Webhook)"
for backward compatibility.
Setting it to an empty string uses the connection name as-is, which is
useful when webhook connections are named after their source system
(e.g., "PVE", "TrueNAS") and the suffix adds no value.
Fixes the hardcoded `${name} (Webhook)` pattern in
GenericHookConnection.ensureDisplayname().
d060092 to
dfe1ed9
Compare
Half-Shot
requested changes
May 18, 2026
Contributor
Half-Shot
left a comment
There was a problem hiding this comment.
Hah, went too early. A few CI failures to clean up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
generic.displaynameSuffixconfig option to control the suffix appended to webhook virtual user display names. Defaults to" (Webhook)"for full backward compatibility.Motivation
When using generic webhooks in a dedicated room per source (e.g., a monitoring room that receives alerts from one system), the hardcoded
(Webhook)suffix in the display name adds no useful information and clutters the UI — especially on mobile clients like Element X where the sender name is shown prominently in push notifications.Setting
displaynameSuffix: ""allows the connection name (e.g., "PVE", "TrueNAS") to be used as-is as the virtual user's display name, which is cleaner when the name already identifies the source.In multi-source rooms, operators can set a custom suffix like
" [alert]"or keep the default.Changes
src/config/sections/GenericHooks.ts: AddeddisplaynameSuffixto the YAML config interface and class, defaulting to" (Webhook)"src/Connections/GenericHook.ts: UpdatedensureDisplayname()to use the configurable suffix instead of the hardcoded string. AddeddisplaynameSuffixtoGenericHookServiceConfigExample config
Testing
Tested with hookshot 7.3.2 base. Verified: