Skip to content

Commit

Permalink
fix: template message components button struct mapping
Browse files Browse the repository at this point in the history
Signed-off-by: sarthakjdev <[email protected]>
  • Loading branch information
sarthakjdev committed Nov 30, 2024
1 parent 0ec8620 commit d92e973
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/manager/template_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d92e973

Please sign in to comment.