mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 16:45:17 +00:00
Can get the number of friendship request with the notifications.
This commit is contained in:
@ -40,11 +40,17 @@ class notificationsController {
|
||||
user_login_required();
|
||||
|
||||
//Get and return the data
|
||||
return array(
|
||||
$data = array(
|
||||
"notifications" => components()->notifications->count_unread(userID),
|
||||
"conversations" => components()->conversations->number_user_unread(userID)
|
||||
);
|
||||
|
||||
//Include friendship requests if required
|
||||
if(isset($_POST["friends_request"]))
|
||||
if(postBool("friends_request"))
|
||||
$data["friends_request"] = components()->friends->count_requests(userID);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user