le pointer
This commit is contained in:
@@ -28,7 +28,7 @@ var spams = []string{
|
|||||||
|
|
||||||
var messagesHistory []*openai.ChatMessage = []*openai.ChatMessage{}
|
var messagesHistory []*openai.ChatMessage = []*openai.ChatMessage{}
|
||||||
|
|
||||||
var usersHistoryCount map[string]userHistoryCount = map[string]userHistoryCount{}
|
var usersHistoryCount map[string]*userHistoryCount = map[string]*userHistoryCount{}
|
||||||
|
|
||||||
type userHistoryCount struct {
|
type userHistoryCount struct {
|
||||||
date time.Time
|
date time.Time
|
||||||
@@ -135,7 +135,7 @@ func updateUserHistoryCount(userID string) bool {
|
|||||||
|
|
||||||
u, ok := usersHistoryCount[userID]
|
u, ok := usersHistoryCount[userID]
|
||||||
if !ok {
|
if !ok {
|
||||||
usersHistoryCount[userID] = userHistoryCount{
|
usersHistoryCount[userID] = &userHistoryCount{
|
||||||
date: now,
|
date: now,
|
||||||
count: 1,
|
count: 1,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user