From 25b774c905b55d1e3d0a70998ddf0472de7709df Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 7 Nov 2023 10:46:55 +0800 Subject: [PATCH] fix --- server/feishu-sync/internal/logic/webhooklogic.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/feishu-sync/internal/logic/webhooklogic.go b/server/feishu-sync/internal/logic/webhooklogic.go index acb4bca2..c59f5d6d 100644 --- a/server/feishu-sync/internal/logic/webhooklogic.go +++ b/server/feishu-sync/internal/logic/webhooklogic.go @@ -25,6 +25,9 @@ func NewWebhookLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebhookLo } } +type EncryptWebhookMsg struct { + Encrypt string `json:"encrypt"` //加密的消息 +} type WebhookMsg struct { Type string `json:"type"` Challenge string `json:"challenge"` @@ -48,7 +51,8 @@ func (l *WebhookLogic) Webhook(w http.ResponseWriter, r *http.Request) { logx.Error("读取请求body失败", err) return } - logx.Info("收到消息:", string(bodyBytes)) + logx.Info("收到头消息:", r.Header) + logx.Info("收到body消息:", string(bodyBytes)) defer r.Body.Close() //如果只是验证http连接的消息 var webhookMsg WebhookMsg