FEATURE: Allow chat incoming webhooks to work without .json extension (#31497)

This provides a slightly nicer-looking URL, and also helps when external
systems have strict validations on the webhook URL.
This commit is contained in:
David Taylor
2025-02-25 15:04:57 +00:00
committed by GitHub
parent 61d8cce569
commit 1d7663d63c
3 changed files with 24 additions and 3 deletions

View File

@ -19,7 +19,7 @@ module Chat
validates :emoji, length: { maximum: 100 }
def url
"#{Discourse.base_url}/chat/hooks/#{key}.json"
"#{Discourse.base_url}/chat/hooks/#{key}"
end
end
end