Standards
This commit is contained in:
parent
33c8872c65
commit
2470482b4e
|
@ -65,12 +65,12 @@ class Show extends ContactEndpoint
|
||||||
$follower = true;
|
$follower = true;
|
||||||
$following = false;
|
$following = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Contact::SHARING:
|
case Contact::SHARING:
|
||||||
$follower = false;
|
$follower = false;
|
||||||
$following = true;
|
$following = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Contact::FRIEND:
|
case Contact::FRIEND:
|
||||||
$follower = true;
|
$follower = true;
|
||||||
$following = true;
|
$following = true;
|
||||||
|
@ -79,7 +79,7 @@ class Show extends ContactEndpoint
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$follower = DBA::exists('contact-relation', ['cid' => $source_cid, 'relation-cid' => $target_cid, 'follows' => true]);
|
$follower = DBA::exists('contact-relation', ['cid' => $source_cid, 'relation-cid' => $target_cid, 'follows' => true]);
|
||||||
$following = DBA::exists('contact-relation', ['relation-cid' => $source_cid, 'cid' => $target_cid, 'follows' => true]);
|
$following = DBA::exists('contact-relation', ['relation-cid' => $source_cid, 'cid' => $target_cid, 'follows' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$relationship = [
|
$relationship = [
|
||||||
|
@ -102,17 +102,17 @@ class Show extends ContactEndpoint
|
||||||
'all_replies' => null,
|
'all_replies' => null,
|
||||||
'marked_spam' => null
|
'marked_spam' => null
|
||||||
],
|
],
|
||||||
'target' => [
|
'target' => [
|
||||||
'id' => $target['id'],
|
'id' => $target['id'],
|
||||||
'id_str' => (string)$target['id'],
|
'id_str' => (string)$target['id'],
|
||||||
'screen_name' => $target['nick'],
|
'screen_name' => $target['nick'],
|
||||||
'following' => $follower,
|
'following' => $follower,
|
||||||
'followed_by' => $following,
|
'followed_by' => $following,
|
||||||
'following_received' => null,
|
'following_received' => null,
|
||||||
'following_requested' => null
|
'following_requested' => null
|
||||||
]
|
|
||||||
]
|
]
|
||||||
];
|
]
|
||||||
|
];
|
||||||
|
|
||||||
DI::apiResponse()->exit('relationship', ['relationship' => $relationship], $this->parameters['extension'] ?? null);
|
DI::apiResponse()->exit('relationship', ['relationship' => $relationship], $this->parameters['extension'] ?? null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue