mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-06 03:00:24 +08:00
fix multipart
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user