feat: Sort contacts via name, email, phone_number, last_activity_at (#1870)

This commit is contained in:
Pranav Raj S
2021-05-13 13:32:19 +05:30
committed by GitHub
parent 368bab2553
commit 0e6cd699e8
24 changed files with 279 additions and 76 deletions

View File

@@ -7,7 +7,7 @@ json.phone_number resource.phone_number
json.thumbnail resource.avatar_url
json.custom_attributes resource.custom_attributes
json.conversations_count resource.conversations_count if resource[:conversations_count].present?
json.last_seen_at resource.last_seen_at.to_i if resource[:last_seen_at].present?
json.last_activity_at resource.last_activity_at.to_i if resource[:last_activity_at].present?
# we only want to output contact inbox when its /contacts endpoints
if defined?(with_contact_inboxes) && with_contact_inboxes.present?