2026-02-04 11:06:13 +00:00
|
|
|
package bus
|
|
|
|
|
|
2026-02-22 13:57:12 +00:00
|
|
|
// Peer identifies the routing peer for a message (direct, group, channel, etc.)
|
|
|
|
|
type Peer struct {
|
|
|
|
|
Kind string `json:"kind"` // "direct" | "group" | "channel" | ""
|
|
|
|
|
ID string `json:"id"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-04 11:06:13 +00:00
|
|
|
type InboundMessage struct {
|
|
|
|
|
Channel string `json:"channel"`
|
|
|
|
|
SenderID string `json:"sender_id"`
|
|
|
|
|
ChatID string `json:"chat_id"`
|
|
|
|
|
Content string `json:"content"`
|
|
|
|
|
Media []string `json:"media,omitempty"`
|
2026-02-22 15:27:55 +00:00
|
|
|
Peer Peer `json:"peer"` // routing peer
|
|
|
|
|
MessageID string `json:"message_id,omitempty"` // platform message ID
|
|
|
|
|
MediaScope string `json:"media_scope,omitempty"` // media lifecycle scope
|
2026-02-04 11:06:13 +00:00
|
|
|
SessionKey string `json:"session_key"`
|
|
|
|
|
Metadata map[string]string `json:"metadata,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type OutboundMessage struct {
|
|
|
|
|
Channel string `json:"channel"`
|
|
|
|
|
ChatID string `json:"chat_id"`
|
|
|
|
|
Content string `json:"content"`
|
|
|
|
|
}
|