Merge remote-tracking branch 'origin/stripe_v2/frontend' into stripe_v2/final

This commit is contained in:
Tanmay Deep Sharma
2025-12-01 20:03:14 +05:30
564 changed files with 16025 additions and 4104 deletions
@@ -1,4 +0,0 @@
json.payload do
json.assignee @conversation.assignee
json.conversation_id @conversation.display_id
end
@@ -1,4 +1,5 @@
json.id webhook.id
json.name webhook.name
json.url webhook.url
json.account_id webhook.account_id
json.subscriptions webhook.subscriptions
@@ -7,10 +7,16 @@ json.meta do
json.partial! 'api/v1/models/contact', formats: [:json], resource: conversation.contact
end
json.channel conversation.inbox.try(:channel_type)
if conversation.assignee&.account
if conversation.assigned_entity.is_a?(AgentBot)
json.assignee do
json.partial! 'api/v1/models/agent', formats: [:json], resource: conversation.assignee
json.partial! 'api/v1/models/agent_bot_slim', formats: [:json], resource: conversation.assigned_entity
end
json.assignee_type 'AgentBot'
elsif conversation.assigned_entity&.account
json.assignee do
json.partial! 'api/v1/models/agent', formats: [:json], resource: conversation.assigned_entity
end
json.assignee_type 'User'
end
if conversation.team.present?
json.team do
@@ -0,0 +1,6 @@
json.id resource.id
json.name resource.name
json.description resource.description
json.thumbnail resource.avatar_url
json.outgoing_url resource.outgoing_url unless resource.system_bot?
json.bot_type resource.bot_type
+2 -1
View File
@@ -74,8 +74,9 @@ end
if resource.email?
## Email Channel Attributes
json.forward_to_email resource.channel.try(:forward_to_email)
json.email resource.channel.try(:email)
json.forwarding_enabled ENV.fetch('MAILER_INBOUND_EMAIL_DOMAIN', '').present?
json.forward_to_email resource.channel.try(:forward_to_email) if ENV.fetch('MAILER_INBOUND_EMAIL_DOMAIN', '').present?
## IMAP
if Current.account_user&.administrator?