From 4e44dd9ec810c786e1825ecd37a824524f4d9413 Mon Sep 17 00:00:00 2001 From: Evan Lin Date: Sun, 6 Feb 2022 21:23:31 +0800 Subject: [PATCH] add back related masrshal --- main.go | 2 +- vendor/github.com/line/line-bot-sdk-go/v7/linebot/event.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 54f31bd3..58ce8d11 100644 --- a/main.go +++ b/main.go @@ -58,7 +58,7 @@ func callbackHandler(w http.ResponseWriter, r *http.Request) { } // message.ID: Msg unique ID // message.Text: Msg text - if _, err = bot.ReplyMessage(event.ReplyToken, linebot.NewTextMessage(message.ID+":"+message.Text+" OK! remain message:"+strconv.FormatInt(quota.Value, 10))).Do(); err != nil { + if _, err = bot.ReplyMessage(event.ReplyToken, linebot.NewTextMessage("msg ID:"+message.ID+":"+"Get:"+message.Text+" , \n OK! remain message:"+strconv.FormatInt(quota.Value, 10))).Do(); err != nil { log.Print(err) } diff --git a/vendor/github.com/line/line-bot-sdk-go/v7/linebot/event.go b/vendor/github.com/line/line-bot-sdk-go/v7/linebot/event.go index 2816cbd8..81da7a27 100644 --- a/vendor/github.com/line/line-bot-sdk-go/v7/linebot/event.go +++ b/vendor/github.com/line/line-bot-sdk-go/v7/linebot/event.go @@ -405,6 +405,7 @@ func (e *Event) MarshalJSON() ([]byte, error) { StickerID: m.StickerID, StickerResourceType: m.StickerResourceType, Keywords: m.Keywords, + Text: m.Text, } } return json.Marshal(&raw) @@ -472,6 +473,7 @@ func (e *Event) UnmarshalJSON(body []byte) (err error) { StickerID: rawEvent.Message.StickerID, StickerResourceType: rawEvent.Message.StickerResourceType, Keywords: rawEvent.Message.Keywords, + Text: rawEvent.Message.Text, } } case EventTypePostback: