1
0
mirror of synced 2024-11-29 00:25:39 +03:00

add webhook structs

This commit is contained in:
Alex Lushpai 2018-05-29 12:51:38 +03:00
parent 698181c6aa
commit 027b00df73

View File

@ -93,3 +93,24 @@ type MessagesResponse struct {
MessageID int `json:"message_id"` MessageID int `json:"message_id"`
Time time.Time `json:"time"` 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"`
Content string `json:"content"`
QuoteMessageExternalID string `json:"quote_message_external_id,omitempty"`
}
type transportRequestMeta struct {
ID uint64 `json:"id"`
Timestamp int64 `json:"timestamp"`
}