quality of life, updated config structure

This commit is contained in:
2025-12-08 06:57:54 +01:00
parent 8f75e6491f
commit 786b217f05
6 changed files with 77 additions and 181 deletions

View File

@@ -67,19 +67,19 @@ type Destination struct {
type GatewayMessageIn struct {
Type string
ID string `json:"id"` // where am I from (channel_id or server_id)
MsgID string `json:"msg_id"` // msg id
Destination Destination `json:"destination,omitempty"` // where do I wanna go (channel_id or empty if from Bot)
Author User `json:"author"` // who sent the message
Content string `json:"content"` // message content
Meta map[string]interface{} `json:"meta,omitempty"` // additional metadata
Ts time.Time `json:"ts,omitempty"` // timestamp
ReceivedAt time.Time `json:"-"` // ReceivedAt is populated by gateway (not from mod)
ID string `json:"id"`
MsgID string `json:"msg_id"`
Destination Destination `json:"destination,omitempty"`
Author User `json:"author"`
Content string `json:"content"`
Meta map[string]interface{} `json:"meta,omitempty"`
Ts time.Time `json:"ts,omitempty"`
ReceivedAt time.Time `json:"-"`
}
type GatewayMessageOut struct {
Type string `json:"type"` // "mod"|"bot"
ID string `json:"channel_id,omitempty"` // message.Destination.ID
Type string `json:"type"`
ID string `json:"channel_id,omitempty"`
Author User `json:"author"`
Content string `json:"content"`
Meta map[string]interface{} `json:"meta,omitempty"`