From d92e973b0b1d55e5cf6a35f0736781c6e6d924de Mon Sep 17 00:00:00 2001 From: sarthakjdev Date: Sat, 30 Nov 2024 07:43:10 +0530 Subject: [PATCH] fix: template message components button struct mapping Signed-off-by: sarthakjdev --- internal/manager/template_manager.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/manager/template_manager.go b/internal/manager/template_manager.go index 5bc6053..54869b2 100644 --- a/internal/manager/template_manager.go +++ b/internal/manager/template_manager.go @@ -99,7 +99,8 @@ const ( // TemplateMessageComponentButton represents a button component in a WhatsApp Business message template. type TemplateMessageComponentButton struct { - Text TemplateMessageButtonType `json:"text,omitempty"` + Type TemplateMessageButtonType `json:"type,omitempty"` + Text string `json:"text,omitempty"` PhoneNumber string `json:"phone_number,omitempty"` // required when Type = PHONE_NUMBER Example string `json:"example,omitempty"` // required when Type = URL and button has a variable Url string `json:"url,omitempty"` // required when Type = URL