adds missing colunms from select query were missing for webhook events

This commit is contained in:
Abhinav Raut
2025-06-14 21:49:31 +05:30
parent e004afd7d1
commit cb6b0e420b

View File

@@ -117,6 +117,8 @@ SELECT
c.sla_policy_id,
c.meta,
sla.name as sla_policy_name,
c.last_message_at,
c.last_message_sender,
c.last_message,
c.custom_attributes,
(SELECT COALESCE(
@@ -132,10 +134,16 @@ SELECT
ct.first_name as "contact.first_name",
ct.last_name as "contact.last_name",
ct.email as "contact.email",
ct.type as "contact.type",
ct.availability_status as "contact.availability_status",
ct.avatar_url as "contact.avatar_url",
ct.phone_number as "contact.phone_number",
ct.phone_number_calling_code as "contact.phone_number_calling_code",
ct.custom_attributes as "contact.custom_attributes",
ct.avatar_url as "contact.avatar_url",
ct.enabled as "contact.enabled",
ct.last_active_at as "contact.last_active_at",
ct.last_login_at as "contact.last_login_at",
as_latest.first_response_deadline_at,
as_latest.resolution_deadline_at,
as_latest.id as applied_sla_id,
@@ -415,11 +423,15 @@ AND NOT(m.id = ANY($1::INT[]))
-- name: get-message
SELECT
m.id,
m.created_at,
m.updated_at,
m.status,
m.type,
m.content,
m.text_content,
m.content_type,
m.conversation_id,
m.uuid,
m.private,
m.sender_type,