From 731f8ab89e6a6171be7581b34cf36f31071b7733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:47:22 +0900 Subject: [PATCH] fix multipart --- openapi_message.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openapi_message.go b/openapi_message.go index 0fa5407..926421a 100644 --- a/openapi_message.go +++ b/openapi_message.go @@ -3,6 +3,7 @@ package nano import ( "encoding/json" "reflect" + "strings" "time" "github.com/pkg/errors" @@ -148,7 +149,7 @@ func (bot *Bot) postMessageTo(ep string, content *MessagePost) (*Message, error) if xi.IsZero() { continue } - tag := t.Field(i).Tag.Get("json") + tag, _, _ := strings.Cut(t.Field(i).Tag.Get("json"), ",") if tag == "-" { tag = "file_image" }