Files
moreminimore-chat/app/views
Muhsin Keloth c8e95efb4c fix(whatsapp): return empty template arrays for malformed inbox data (#15356)
WhatsApp inbox responses now return an empty template list when the
stored `message_templates` value is not an array. This prevents mobile
clients from receiving the legacy/default object shape that can crash
the WhatsApp reply box.

Valid template arrays remain unchanged.

Related: https://github.com/chatwoot/chatwoot-mobile-app/pull/1127

### Things to know

- No database migration or backfill is included.
- This does not change the web template-button behavior; that can be
handled separately.

### How to reproduce

1. In a local environment, set a WhatsApp inbox's `message_templates`
value to `{}`.
2. Load the inbox API response and open one of its conversations in the
mobile app.
3. Confirm the response contains `message_templates: []` and the reply
box does not crash.
4. Repeat with a valid template array and confirm the templates are
preserved.

Co-authored-by: Muhsin <12408980+muhsin-k@users.noreply.github.com>
2026-08-07 15:23:19 +05:30
..
2024-10-02 00:36:30 -07:00