mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 00:25:18 +00:00
Get following status
This commit is contained in:
@ -102,6 +102,7 @@ class friendsController{
|
||||
"are_friend" => false,
|
||||
"sent_request" => false,
|
||||
"received_request" => false,
|
||||
"following" => false,
|
||||
);
|
||||
|
||||
//Check if the two personns are friend
|
||||
@ -119,6 +120,13 @@ class friendsController{
|
||||
if(CS::get()->components->friends->sent_request($friendID, userID))
|
||||
$response["received_request"] = true;
|
||||
}
|
||||
else {
|
||||
|
||||
//Perform the check specific to the real friend
|
||||
if(CS::get()->components->friends->is_following(userID, $friendID))
|
||||
$response['following'] = true;
|
||||
|
||||
}
|
||||
|
||||
//Return the response
|
||||
return $response;
|
||||
|
Reference in New Issue
Block a user