Closed maheshsattala closed 2 months ago
The changes involve updates to the WhatsApp integration within the Kairon framework, including an upgrade to the API version in both cloud and on-premise clients, enhancements to message handling for payment notifications, and modifications to audit logging. Additionally, new constants and slots related to payment processing have been introduced, alongside updates to the testing suite to ensure compatibility with these changes.
Files | Change Summary |
---|---|
kairon/chat/handlers/channels/clients/whatsapp/cloud.py , kairon/chat/handlers/channels/clients/whatsapp/on_premise.py |
Updated DEFAULT_API_VERSION from 13.0 to 19.0 . |
kairon/chat/handlers/channels/whatsapp.py |
Enhanced message handling to process "payment" messages and updated logic in __handle_meta_payload . |
kairon/shared/chat/processor.py |
Modified save_whatsapp_audit_log method to include a new recipient parameter. |
kairon/shared/constants.py |
Added new enumeration value payment to KaironSystemSlots . |
kairon/shared/data/processor.py |
Introduced KaironSystemSlots.payment.value to non_conversational_slots in add_system_required_slots . |
tests/integration_test/chat_service_test.py |
Added test_whatsapp_payment_message_request and updated assertions for recipient logging in existing tests. |
tests/integration_test/services_test.py |
Updated expected lengths in assertions for API response structures. |
tests/unit_test/data_processor/data_processor_test.py |
Modified assertions related to slot and entity counts to reflect changes in the underlying data structure. |
tests/unit_test/channel_client_test.py |
Updated API endpoint URLs in tests to reflect the new version (v19.0) for various test functions. |
sequenceDiagram
participant User
participant WhatsApp
participant Kairon
participant Processor
User->>WhatsApp: Send payment message
WhatsApp->>Kairon: Forward payment message
Kairon->>Processor: Process payment message
Processor->>Kairon: Log payment info
Kairon->>User: Acknowledge payment
π° "In the land of code where rabbits hop,
New versions bloom, and changes pop!
Payments now dance with a joyful cheer,
As logs capture all, far and near.
With constants added, our slots expand,
Hooray for updates, letβs take a stand!" π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Added code for handling the webhook event after completing payment and added test cases.
Summary by CodeRabbit
New Features
Bug Fixes
Tests