commit
cf9726db9d
22
v1/types.go
22
v1/types.go
@ -93,3 +93,25 @@ type MessagesResponse struct {
|
||||
MessageID int `json:"message_id"`
|
||||
Time time.Time `json:"time"`
|
||||
}
|
||||
|
||||
// Webhook request
|
||||
type WebhookRequest struct {
|
||||
Type string `json:"type"`
|
||||
Meta TransportRequestMeta `json:"meta"`
|
||||
Data WebhookData `json:"data"`
|
||||
}
|
||||
|
||||
// WebhookData request data
|
||||
type WebhookData struct {
|
||||
ExternalUserID string `json:"external_user_id"`
|
||||
ExternalMessageID string `json:"external_message_id,omitempty"`
|
||||
ChannelID uint64 `json:"channel_id"`
|
||||
ChatID int64 `json:"channel_id"` // TODO: add to webhook request
|
||||
Content string `json:"content"`
|
||||
QuoteMessageExternalID string `json:"quote_message_external_id,omitempty"`
|
||||
}
|
||||
|
||||
type TransportRequestMeta struct {
|
||||
ID uint64 `json:"id"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user