sajuthankappan / whatsapp-cloud-api-rs

19 stars 7 forks source link

This library doesn't support buttons #5

Open Tameflame opened 9 months ago

Tameflame commented 9 months ago

https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages#interactive-messages

Components which are buttons require an "index" property, which your library doesn't have. In your library, components have component_type, sub_type, and parameteres.

sajuthankappan commented 9 months ago

Thanks for reporting the issue. I'll try to add this feature in the next release.

sajuthankappan commented 9 months ago

v0.5.0 is published to add index attribute. Please check and let me know if this helps.

Changelog for v0.5.0

### Added

- index attribute for Component, specifically meant for buttons
- for_button function for Component

### Changed

- **Breaking:** component_type and sub_types of Component are now enums
- **Breaking:** parameter_type of Paramter is now enum