fix: 使用node上报合并转发
This commit is contained in:
parent
ec92baf5bc
commit
cd92d05a18
@ -35,11 +35,8 @@ func help(msg model.Message) *model.Reply {
|
|||||||
nodeMsg.Data.UserID = "123456789"
|
nodeMsg.Data.UserID = "123456789"
|
||||||
nodeMsg.Data.Nickname = "test"
|
nodeMsg.Data.Nickname = "test"
|
||||||
nodeMsg.Data.Content = []any{textMsg}
|
nodeMsg.Data.Content = []any{textMsg}
|
||||||
forwardMsg := message.NewForwardMessage()
|
|
||||||
forwardMsg.Data.ID = "10086"
|
|
||||||
forwardMsg.Data.Content = []any{nodeMsg}
|
|
||||||
return &model.Reply{
|
return &model.Reply{
|
||||||
ReplyMsg: []any{&forwardMsg},
|
ReplyMsg: []any{&nodeMsg},
|
||||||
ReferOriginMsg: false,
|
ReferOriginMsg: false,
|
||||||
FromMsg: msg,
|
FromMsg: msg,
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,8 @@ type ForwardMessage struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ForwardMessageData struct {
|
type ForwardMessageData struct {
|
||||||
ID string `json:"id"` // 转发消息ID
|
ID string `json:"id"` // 转发消息ID
|
||||||
Content []interface{} `json:"content,omitempty"` // 转发消息内容
|
Content []any `json:"content,omitempty"` // 转发消息内容
|
||||||
}
|
}
|
||||||
|
|
||||||
// NodeMessage 转发消息节点
|
// NodeMessage 转发消息节点
|
||||||
@ -24,10 +24,10 @@ type NodeMessage struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type NodeMessageData struct {
|
type NodeMessageData struct {
|
||||||
ID string `json:"id,omitempty"` // 转发消息ID
|
ID string `json:"id,omitempty"` // 转发消息ID
|
||||||
UserID string `json:"user_id,omitempty"` // 发送者QQ号
|
UserID string `json:"user_id,omitempty"` // 发送者QQ号
|
||||||
Nickname string `json:"nickname,omitempty"` // 发送者昵称
|
Nickname string `json:"nickname,omitempty"` // 发送者昵称
|
||||||
Content []interface{} `json:"content,omitempty"` // 消息内容
|
Content []any `json:"content,omitempty"` // 消息内容
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -15,7 +15,7 @@ type GroupInfo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Reply struct {
|
type Reply struct {
|
||||||
ReplyMsg interface{} `json:"replyMsg"`
|
ReplyMsg any `json:"replyMsg"`
|
||||||
ReferOriginMsg bool `json:"referOriginMsg"`
|
ReferOriginMsg bool `json:"referOriginMsg"`
|
||||||
FromMsg Message `json:"fromMsg"`
|
FromMsg Message `json:"fromMsg"`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user