浏览代码

Modify slack webhook url validation to allow workflow (#6041) (#6042)

Co-authored-by: Shunsuke Mabuchi <mabuchs@amazon.co.jp>
Mab 9 月之前
父节点
当前提交
91c5818236
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/core/tools/provider/builtin/slack/tools/slack_webhook.py

+ 1 - 1
api/core/tools/provider/builtin/slack/tools/slack_webhook.py

@@ -20,7 +20,7 @@ class SlackWebhookTool(BuiltinTool):
 
         webhook_url = tool_parameters.get('webhook_url', '')
 
-        if not webhook_url.startswith('https://hooks.slack.com/services/'):
+        if not webhook_url.startswith('https://hooks.slack.com/'):
             return self.create_text_message(
                 f'Invalid parameter webhook_url ${webhook_url}, not a valid Slack webhook URL')