1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-07-15 17:33:48 +00:00

Merge pull request #316 from XYenon/patch-1

Fix empty message segment
This commit is contained in:
Mrs4s
2020-09-24 00:47:01 +08:00
committed by GitHub

View File

@ -58,8 +58,6 @@ func ToArrayMessage(e []message.IMessageElement, code int64, raw ...bool) (r []M
"type": "text", "type": "text",
"data": map[string]string{"text": o.Content}, "data": map[string]string{"text": o.Content},
} }
case *message.ReplyElement:
continue
case *message.LightAppElement: case *message.LightAppElement:
//m = MSG{ //m = MSG{
// "type": "text", // "type": "text",
@ -144,6 +142,8 @@ func ToArrayMessage(e []message.IMessageElement, code int64, raw ...bool) (r []M
"data": map[string]string{"data": o.Content, "resid": fmt.Sprintf("%d", o.Id)}, "data": map[string]string{"data": o.Content, "resid": fmt.Sprintf("%d", o.Id)},
} }
} }
default:
continue
} }
r = append(r, m) r = append(r, m)
} }