Align bus message struct formatting with upstream

This commit is contained in:
Dmitrii Balabanov 2026-03-23 10:44:50 +02:00
parent ddc2fc1818
commit bd3017dd8e

View file

@ -18,24 +18,26 @@ type SenderInfo struct {
} }
type InboundMessage struct { type InboundMessage struct {
Channel string `json:"channel"` Channel string `json:"channel"`
SenderID string `json:"sender_id"` SenderID string `json:"sender_id"`
Sender SenderInfo `json:"sender"` Sender SenderInfo `json:"sender"`
ChatID string `json:"chat_id"` ChatID string `json:"chat_id"`
Content string `json:"content"` Content string `json:"content"`
Media []string `json:"media,omitempty"` Media []string `json:"media,omitempty"`
Peer Peer `json:"peer"` // routing peer Peer Peer `json:"peer"` // routing peer
MessageID string `json:"message_id,omitempty"` // platform message ID MessageID string `json:"message_id,omitempty"` // platform message ID
ReplyToMessageID string `json:"reply_to_message_id,omitempty"` // parent platform message ID MediaScope string `json:"media_scope,omitempty"` // media lifecycle scope
MediaScope string `json:"media_scope,omitempty"` // media lifecycle scope SessionKey string `json:"session_key"`
SessionKey string `json:"session_key"` Metadata map[string]string `json:"metadata,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
ReplyToMessageID string `json:"reply_to_message_id,omitempty"` // parent platform message ID
} }
type OutboundMessage struct { type OutboundMessage struct {
Channel string `json:"channel"` Channel string `json:"channel"`
ChatID string `json:"chat_id"` ChatID string `json:"chat_id"`
Content string `json:"content"` Content string `json:"content"`
ReplyToMessageID string `json:"reply_to_message_id,omitempty"` ReplyToMessageID string `json:"reply_to_message_id,omitempty"`
OnDelivered func(msgIDs []string) `json:"-"` OnDelivered func(msgIDs []string) `json:"-"`
} }