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