1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00
This commit is contained in:
Mrs4s 2020-07-20 16:23:27 +08:00
parent 806ecc3697
commit 41141b5a84

View File

@ -3,6 +3,7 @@ package message
import (
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"reflect"
"strconv"
"strings"
)
@ -121,7 +122,8 @@ func (msg *GroupMessage) ToString() (res string) {
}
func (msg *SendingMessage) Append(e IMessageElement) *SendingMessage {
if e != nil {
v := reflect.ValueOf(e)
if v.Kind() == reflect.Ptr && !v.IsNil() {
msg.Elements = append(msg.Elements, e)
}
return msg