From 202fa686d4cbdad9da2a3a9d4c618f3349ffee6f Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 21 May 2024 14:18:10 +0530 Subject: [PATCH] feat: update payload to include `reauthorization_required` --- app/views/api/v1/models/_inbox.json.jbuilder | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/api/v1/models/_inbox.json.jbuilder b/app/views/api/v1/models/_inbox.json.jbuilder index 09db8fdc4..a9956c7e6 100644 --- a/app/views/api/v1/models/_inbox.json.jbuilder +++ b/app/views/api/v1/models/_inbox.json.jbuilder @@ -71,8 +71,11 @@ if resource.email? json.imap_address resource.channel.try(:imap_address) json.imap_port resource.channel.try(:imap_port) json.imap_enabled resource.channel.try(:imap_enabled) - json.microsoft_reauthorization resource.channel.try(:microsoft?) && resource.channel.try(:provider_config).empty? json.imap_enable_ssl resource.channel.try(:imap_enable_ssl) + + if resource.channel.try(:microsoft?) + json.microsoft_reauthorization resource.channel.try(:provider_config).empty? || resource.channel.try(:reauthorization_required?) + end end ## SMTP