From 1b8f9cd42c9614ea2fe772547eb8226e13c3e922 Mon Sep 17 00:00:00 2001 From: jiangyong Date: Fri, 5 Jul 2024 08:07:36 +0800 Subject: [PATCH] customer message --- qyweixin/app_customer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qyweixin/app_customer.go b/qyweixin/app_customer.go index fc0ed5d..8d08dbd 100644 --- a/qyweixin/app_customer.go +++ b/qyweixin/app_customer.go @@ -4,6 +4,7 @@ import ( "encoding/json" "errors" "fmt" + "github.com/smbrave/goutil" "github.com/spf13/cast" "gitlab.batiao8.com/open/gosdk/util" "gitlab.batiao8.com/open/gosdk/wechat/message" @@ -45,6 +46,7 @@ type CustomerMessage struct { Origin int SendTime int64 SyncTime int64 + Raw string Text *CustomerText Event *CustomerEvent Image *CustomerImage @@ -313,6 +315,7 @@ func (m *CustomerMessage) From(data map[string]interface{}) { m.ExternalUserid = cast.ToString(data["external_userid"]) m.ServicerUserid = cast.ToString(data["servicer_userid"]) m.OpenKfid = cast.ToString(data["open_kfid"]) + m.Raw = goutil.EncodeJSON(data) if m.Msgtype == message.MsgTypeEvent { m.parseEvent(data)