1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-12 14:10:47 +08:00

fix multipart

This commit is contained in:
源文雨
2023-10-16 11:47:22 +09:00
parent 8bae3c1ad2
commit 731f8ab89e

View File

@@ -3,6 +3,7 @@ package nano
import ( import (
"encoding/json" "encoding/json"
"reflect" "reflect"
"strings"
"time" "time"
"github.com/pkg/errors" "github.com/pkg/errors"
@@ -148,7 +149,7 @@ func (bot *Bot) postMessageTo(ep string, content *MessagePost) (*Message, error)
if xi.IsZero() { if xi.IsZero() {
continue continue
} }
tag := t.Field(i).Tag.Get("json") tag, _, _ := strings.Cut(t.Field(i).Tag.Get("json"), ",")
if tag == "-" { if tag == "-" {
tag = "file_image" tag = "file_image"
} }