FIX: Relax validation for teams webhook urls to support custom domains (#56)

This commit is contained in:
David Taylor 2021-01-26 17:45:49 +00:00 committed by GitHub
parent 39edff4db4
commit 00ec1f486a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ module DiscourseChat::Provider::TeamsProvider
PROVIDER_ENABLED_SETTING = :chat_integration_teams_enabled
CHANNEL_PARAMETERS = [
{ key: "name", regex: '^\S+$', unique: true },
{ key: "webhook_url", regex: '^https:\/\/outlook\.office\.com\/webhook\/[A-Za-z0-9\-@\/]+\S+$', unique: true, hidden: true }
{ key: "webhook_url", regex: '^https:\/\/\S+$', unique: true, hidden: true }
]
def self.trigger_notification(post, channel, rule)