sajuthankappan / whatsapp-cloud-api-rs

16 stars 6 forks source link

This library doesn't support buttons #5

Open Tameflame opened 5 months ago

Tameflame commented 5 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 4 months ago

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

sajuthankappan commented 4 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