fix webhooks

This commit is contained in:
jxxghp
2023-06-11 20:11:19 +08:00
parent f1a798cd05
commit 738335d16c
7 changed files with 36 additions and 22 deletions

View File

@ -1,3 +1,5 @@
from typing import Any
from app.chain import ChainBase
@ -6,12 +8,12 @@ class WebhookMessageChain(ChainBase):
响应Webhook事件
"""
def process(self, message: dict) -> None:
def process(self, body: Any, form: Any, args: Any) -> None:
"""
处理Webhook报文并发送消息
"""
# 获取主体内容
info: dict = self.webhook_parser(message=message)
info: dict = self.webhook_parser(body=body, form=form, args=args)
if not info:
return
# 发送消息