mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
fix empty friend message.
This commit is contained in:
parent
e911123a30
commit
a0219d76ea
@ -296,6 +296,10 @@ func (bot *CQBot) SendPrivateMessage(target int64, m *message.SendingMessage) in
|
|||||||
}
|
}
|
||||||
newElem = append(newElem, elem)
|
newElem = append(newElem, elem)
|
||||||
}
|
}
|
||||||
|
if len(newElem) == 0 {
|
||||||
|
log.Warnf("好友消息发送失败: 消息为空.")
|
||||||
|
return -1
|
||||||
|
}
|
||||||
m.Elements = newElem
|
m.Elements = newElem
|
||||||
var id int32 = -1
|
var id int32 = -1
|
||||||
if bot.Client.FindFriend(target) != nil { // 双向好友
|
if bot.Client.FindFriend(target) != nil { // 双向好友
|
||||||
|
Loading…
x
Reference in New Issue
Block a user