From 9fa0b317c1def79e14abac74d09b3d1502b49fa7 Mon Sep 17 00:00:00 2001 From: Maria Tyschitskaya Date: Tue, 2 Nov 2021 12:43:52 +0300 Subject: [PATCH] add postback payload description in message --- message.go | 4 ++-- receiving.go | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/message.go b/message.go index 250d410..f2564ba 100644 --- a/message.go +++ b/message.go @@ -138,9 +138,9 @@ type PostBack struct { // PostBackPayload represents payload data in PostBack type PostBackPayload struct { - Title string `json:"title"` + Title string `json:"title"` Payload string `json:"payload"` - Mid string `json:"mid"` + Mid string `json:"mid"` } type AccountLinking struct { diff --git a/receiving.go b/receiving.go index f08a46f..2c6a05f 100644 --- a/receiving.go +++ b/receiving.go @@ -117,20 +117,20 @@ type Payload struct { URL string `json:"url,omitempty"` Title string `json:"title,omitempty"` // Coordinates is Lat/Long pair of location pin - Coordinates *Coordinates `json:"coordinates,omitempty"` - TemplateType string `json:"template_type,omitempty"` - Buttons []Button `json:"buttons,omitempty"` + Coordinates *Coordinates `json:"coordinates,omitempty"` + TemplateType string `json:"template_type,omitempty"` + Buttons []Button `json:"buttons,omitempty"` } type Button struct { - Type string `json:"type,omitempty"` - Title string `json:"title,omitempty"` - Payload string `json:"payload,omitempty"` - URL string `json:"url,omitempty"` - WebviewHeightRatio string `json:"webview_height_ratio,omitempty"` - MessengerExtensions bool `json:"messenger_extensions,omitempty"` - FallbackURL string `json:"fallback_url,omitempty"` - WebviewShareButton string `json:"webview_share_button,omitempty"` + Type string `json:"type,omitempty"` + Title string `json:"title,omitempty"` + Payload string `json:"payload,omitempty"` + URL string `json:"url,omitempty"` + WebviewHeightRatio string `json:"webview_height_ratio,omitempty"` + MessengerExtensions bool `json:"messenger_extensions,omitempty"` + FallbackURL string `json:"fallback_url,omitempty"` + WebviewShareButton string `json:"webview_share_button,omitempty"` } // Coordinates is a pair of latitude and longitude.