feat: Add Contacts page (#1335)
Co-authored-by: Sojan <sojan@pepalo.com> Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2babfd6148
commit
f214c9c47c
@@ -1,3 +1,8 @@
|
||||
json.meta do
|
||||
json.count @contacts_count
|
||||
json.current_page @current_page
|
||||
end
|
||||
|
||||
json.payload do
|
||||
json.array! @contacts do |contact|
|
||||
json.partial! 'api/v1/models/contact.json.jbuilder', resource: contact, with_contact_inboxes: true
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
json.meta do
|
||||
json.count @contacts_count
|
||||
json.current_page @current_page
|
||||
end
|
||||
|
||||
json.payload do
|
||||
json.array! @contacts do |contact|
|
||||
json.partial! 'api/v1/models/contact.json.jbuilder', resource: contact, with_contact_inboxes: true
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
json.meta do
|
||||
json.count @contacts_count
|
||||
json.current_page @current_page
|
||||
end
|
||||
|
||||
json.payload do
|
||||
json.array! @contacts do |contact|
|
||||
json.partial! 'api/v1/models/contact.json.jbuilder', resource: contact, with_contact_inboxes: true
|
||||
|
||||
@@ -6,6 +6,8 @@ json.name resource.name
|
||||
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 if resource[:last_seen_at].present?
|
||||
|
||||
# we only want to output contact inbox when its /contacts endpoints
|
||||
if defined?(with_contact_inboxes) && with_contact_inboxes.present?
|
||||
|
||||
Reference in New Issue
Block a user