1
0
mirror of synced 2024-11-24 22:16:05 +03:00

Merge pull request #21 from gwinn/master

add user/bot name & photo for webhook
This commit is contained in:
Alex Lushpai 2018-08-28 16:57:57 +03:00 committed by GitHub
commit 8be7a95768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,13 +138,26 @@ type WebhookRequest struct {
// WebhookData request data
type WebhookData struct {
ExternalUserID string `json:"external_user_id"`
ExternalMessageID string `json:"external_message_id,omitempty"`
ExternalChatID string `json:"external_chat_id"`
ChannelID uint64 `json:"channel_id"`
Content string `json:"content"`
QuoteExternalID string `json:"quote_external_id,omitempty"`
QuoteContent string `json:"quote_content,omitempty"`
ExternalUserID string `json:"external_user_id"`
ExternalMessageID string `json:"external_message_id,omitempty"`
ExternalChatID string `json:"external_chat_id"`
ChannelID uint64 `json:"channel_id"`
Content string `json:"content"`
QuoteExternalID string `json:"quote_external_id,omitempty"`
QuoteContent string `json:"quote_content,omitempty"`
User *MessageDataUser `json:"user,omitempty"`
Bot *MessageDataBot `json:"bot,omitempty"`
}
type MessageDataUser struct {
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Avatar string `json:"avatar"`
}
type MessageDataBot struct {
Name string `json:"name"`
Avatar string `json:"avatar"`
}
// TransportRequestMeta request metadata