1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-06 03:53:50 +08:00

Fix id missing, closes #813

This commit is contained in:
Sam 2021-04-11 17:15:36 +08:00
parent 35860a4b11
commit 7db6070b18
No known key found for this signature in database
GPG Key ID: 2057906F881702DD

View File

@ -316,7 +316,10 @@ func (bot *CQBot) SendPrivateMessage(target int64, groupID int64, m *message.Sen
log.Errorf("错误: 群员(%v) 不在 群(%v), 无法发起临时会话", target, groupID)
default:
if session == nil && groupID != 0 {
bot.Client.SendGroupTempMessage(groupID, target, m)
msg := bot.Client.SendGroupTempMessage(groupID, target, m)
if msg != nil {
id = bot.InsertTempMessage(target, msg)
}
break
}
msg, err := session.(*client.TempSessionInfo).SendMessage(m)