Handle business messages

This commit is contained in:
HugeFrog24
2024-10-20 15:52:41 +02:00
parent 0ab56448c7
commit e5532df7f9
14 changed files with 219 additions and 61 deletions

23
models.go Normal file → Executable file
View File

@@ -28,19 +28,22 @@ type ConfigModel struct {
type Message struct {
gorm.Model
BotID uint
ChatID int64
UserID int64
Username string
UserRole string
Text string
Timestamp time.Time
IsUser bool
BotID uint
ChatID int64
UserID int64
Username string
UserRole string
Text string
StickerFileID string `json:"sticker_file_id,omitempty"` // New field to store Sticker File ID
StickerPNGFile string `json:"sticker_png_file,omitempty"` // Optionally store PNG file ID if needed
Timestamp time.Time
IsUser bool
}
type ChatMemory struct {
Messages []Message
Size int
Messages []Message
Size int
BusinessConnectionID string // New field to store the business connection ID
}
type Role struct {