From a9de672932cd81555e2e8ff9f21fd530530b1cf1 Mon Sep 17 00:00:00 2001 From: Sojan Jose Date: Wed, 26 Feb 2025 16:35:47 -0800 Subject: [PATCH] chore: Fix issue with new conversation editor (#10985) https://github.com/chatwoot/chatwoot/pull/10888 introduced a bug in the conversation editor since we were using the templates , email and phone number payloads in contactable inboxes . temporary fix for this, we need to rework this fix. --- app/views/api/v1/models/_inbox_slim.json.jbuilder | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/views/api/v1/models/_inbox_slim.json.jbuilder b/app/views/api/v1/models/_inbox_slim.json.jbuilder index 0b2670c0b..67bc7e843 100644 --- a/app/views/api/v1/models/_inbox_slim.json.jbuilder +++ b/app/views/api/v1/models/_inbox_slim.json.jbuilder @@ -4,4 +4,10 @@ json.channel_id resource.channel_id json.name resource.name json.channel_type resource.channel_type json.provider resource.channel.try(:provider) + +# Fix me: this is for the new conversation modal to work, +# Potentially refactor this later. json.email resource.channel.try(:email) if resource.email? +json.phone_number resource.channel.try(:phone_number) +json.medium resource.channel.try(:medium) if resource.twilio? +json.message_templates resource.channel.try(:message_templates) if resource.whatsapp?