Shawn 3 лет назад
Родитель
Сommit
cfabbbe14b
2 измененных файлов с 13 добавлено и 0 удалено
  1. 8 0
      changes/v5.0.14/fix-9705.en.md
  2. 5 0
      changes/v5.0.14/fix-9705.zh.md

+ 8 - 0
changes/v5.0.14/fix-9705.en.md

@@ -0,0 +1,8 @@
+Remove the default value of Webhook.
+Before this repair, the default value of the `body` field of Webhook is `${payload}`,
+but there is no `payload` field in the available fields of other events except message
+publishing in the rule, so in this case, the webhook will send a string with the
+message body as "undefined" to the HTTP service.
+This fix removes the default value of the `body` field. When the `body` field is
+not configured, Webhook will send all available fields of the current event in
+the format of JSON object.

+ 5 - 0
changes/v5.0.14/fix-9705.zh.md

@@ -0,0 +1,5 @@
+删除 Webhook 的默认值。
+在此修复之前,Webhook 的 `body` 字段的默认值为 `${payload}`,但规则中除了消息发布之外的其他事件的可用字段中
+都没有 `payload` 字段,所以这种情况下 Webhook 将发送消息正文为 "undefined" 的字符串到 HTTP 服务。
+此修复移除了 `body` 字段的默认值,当未配置 `body` 字段的时候,Webhook 将以 JSON object 的格式发送
+当前事件的全部可用字段。