Added method getCountUnreadMessages

This commit is contained in:
bison-paolo
2016-12-20 11:28:51 +01:00
parent b3476f93c1
commit b99123efc6
3 changed files with 57 additions and 0 deletions
@@ -105,6 +105,25 @@ class Message extends APIv1_Controller
}
}
/**
* @return void
*/
public function getCountUnreadMessages()
{
$person_id = $this->get('person_id');
if (isset($person_id))
{
$result = $this->messagelib->getCountUnreadMessages($person_id);
$this->response($result, REST_Controller::HTTP_OK);
}
else
{
$this->response();
}
}
/**
* @return void
*/