🎨 AI对话历史记录数量修改为20条
This commit is contained in:
parent
bc3622464f
commit
f3e2f6e429
@ -19,8 +19,12 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 已经通知过的群组或者好友map
|
||||
var notifyMap = make(map[string]bool)
|
||||
|
||||
// 拉取最近消息条数
|
||||
const fetchMessageCount = 20
|
||||
|
||||
// AI
|
||||
// @description: AI消息
|
||||
// @param m
|
||||
@ -198,7 +202,7 @@ func getGroupUserMessages(msgId int64, groupId, groupUserId string) (records []e
|
||||
Where("create_at >= DATE_SUB(NOW(),INTERVAL 30 MINUTE)").
|
||||
Where(subQuery).
|
||||
Order("create_at desc").
|
||||
Limit(4).Find(&records)
|
||||
Limit(fetchMessageCount).Find(&records)
|
||||
return
|
||||
}
|
||||
|
||||
@ -214,6 +218,6 @@ func getUserPrivateMessages(userId string) (records []entity.Message) {
|
||||
Where("create_at >= DATE_SUB(NOW(),INTERVAL 30 MINUTE)").
|
||||
Where(subQuery).
|
||||
Order("create_at desc").
|
||||
Limit(4).Find(&records)
|
||||
Limit(fetchMessageCount).Find(&records)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user