FIX: Allow discord.com webhook URLs

This commit is contained in:
David Taylor 2020-08-18 00:34:59 +01:00
parent fd51671991
commit bb4143a695
No known key found for this signature in database
GPG Key ID: 46904C18B1D3F434

View File

@ -8,7 +8,7 @@ module DiscourseChat
CHANNEL_PARAMETERS = [
{ key: "name", regex: '^\S+' },
{ key: "webhook_url", regex: '^https:\/\/discordapp\.com\/api\/webhooks\/', unique: true, hidden: true }
{ key: "webhook_url", regex: '^https:\/\/discord(?:app)?\.com\/api\/webhooks\/', unique: true, hidden: true }
].freeze
def self.send_message(url, message)