From da8451cf857c1c313d16afbcb666775d55bb5fa2 Mon Sep 17 00:00:00 2001 From: Maria Tyschitskaya Date: Tue, 2 Nov 2021 16:39:36 +0300 Subject: [PATCH] fix postback payload description in message --- message.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/message.go b/message.go index f2564ba..966a064 100644 --- a/message.go +++ b/message.go @@ -130,17 +130,14 @@ type PostBack struct { Recipient Recipient `json:"-"` // Time is when the message was sent. Time time.Time `json:"-"` - // PostBack Payload - Payload PostBackPayload `json:"payload"` + // PostBack ID + Payload string `json:"payload"` // Optional referral info Referral Referral `json:"referral"` -} - -// PostBackPayload represents payload data in PostBack -type PostBackPayload struct { - Title string `json:"title"` - Payload string `json:"payload"` - Mid string `json:"mid"` + // Title for the CTA that was clicked on + Title string `json:"title"` + // Message ID + Mid string `json:"mid"` } type AccountLinking struct {