Skip to content

Commit

Permalink
Check product key name
Browse files Browse the repository at this point in the history
  • Loading branch information
Robi9 committed Nov 22, 2023
1 parent 6caf8c7 commit 2a71fdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion handlers/facebookapp/facebookapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,10 @@ func (h *handler) sendCloudAPIWhatsappMsg(ctx context.Context, msg courier.Msg)
})
}

if key == "product_retailer_id" {
key = "items"
}

sections = append(sections, wacMTSection{Title: key, ProductItems: sproducts})
}
}
Expand All @@ -1886,7 +1890,6 @@ func (h *handler) sendCloudAPIWhatsappMsg(ctx context.Context, msg courier.Msg)
return status, err
}
} else {
fmt.Println("unitario")
interactive.Action = &struct {
Button string `json:"button,omitempty"`
Sections []wacMTSection `json:"sections,omitempty"`
Expand Down

0 comments on commit 2a71fdd

Please sign in to comment.