mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
5a35ef34ac
- Refactor channel manager with support for Sender/Receiver interfaces and hot-swappable adapters. - Implement identity routing and pre-authentication logic for inbound messages. - Update database schema to support bot pre-auth keys and extended channel session metadata. - Add Telegram and Feishu channel configuration and adapter enhancements. - Update Swagger documentation and internal handlers for channel management. Co-authored-by: Cursor <cursoragent@cursor.com>
46 lines
797 B
Go
46 lines
797 B
Go
package contacts
|
|
|
|
import "time"
|
|
|
|
type Contact struct {
|
|
ID string
|
|
BotID string
|
|
UserID string
|
|
DisplayName string
|
|
Alias string
|
|
Tags []string
|
|
Status string
|
|
Metadata map[string]any
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
type ContactChannel struct {
|
|
ID string
|
|
BotID string
|
|
ContactID string
|
|
Platform string
|
|
ExternalID string
|
|
Metadata map[string]any
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
type CreateRequest struct {
|
|
BotID string
|
|
UserID string
|
|
DisplayName string
|
|
Alias string
|
|
Tags []string
|
|
Status string
|
|
Metadata map[string]any
|
|
}
|
|
|
|
type UpdateRequest struct {
|
|
DisplayName *string
|
|
Alias *string
|
|
Tags *[]string
|
|
Status *string
|
|
Metadata map[string]any
|
|
}
|