feat: Add API to get the active contacts (#1313)

This commit is contained in:
Sojan Jose
2020-10-05 23:30:27 +05:30
committed by GitHub
parent 11725de09a
commit 88b2469dc8
6 changed files with 57 additions and 2 deletions

View File

@@ -8,6 +8,12 @@ class Api::V1::Accounts::ContactsController < Api::V1::Accounts::BaseController
@contacts = Current.account.contacts
end
# returns online contacts
def active
@contacts = Current.account.contacts.where(id: ::OnlineStatusTracker
.get_available_contact_ids(Current.account.id))
end
def show; end
def create