mirror of
https://github.com/friendica/friendica
synced 2024-12-23 03:20:15 +00:00
Breakup public/user ID query results so can always query blocked status by CID
This commit is contained in:
parent
b3226e11ac
commit
4a00731aa4
1 changed files with 8 additions and 8 deletions
|
@ -38,14 +38,14 @@ class Relationship extends BaseFactory
|
||||||
public function createFromContactId(int $contactId, int $uid): RelationshipEntity
|
public function createFromContactId(int $contactId, int $uid): RelationshipEntity
|
||||||
{
|
{
|
||||||
$cdata = Contact::getPublicAndUserContactID($contactId, $uid);
|
$cdata = Contact::getPublicAndUserContactID($contactId, $uid);
|
||||||
if (!empty($cdata)) {
|
$pcid = !empty($cdata['public']) ? $cdata['public'] : $contactId;
|
||||||
$cid = $cdata['user'];
|
$cid = !empty($cdata['user']) ? $cdata['user'] : $contactId;
|
||||||
$pcid = $cdata['public'];
|
|
||||||
} else {
|
|
||||||
$pcid = $cid = $contactId;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new RelationshipEntity($pcid, Contact::getById($cid),
|
return new RelationshipEntity(
|
||||||
Contact\User::isBlocked($cid, $uid), Contact\User::isIgnored($cid, $uid));
|
$pcid,
|
||||||
|
Contact::getById($cid),
|
||||||
|
Contact\User::isBlocked($cid, $uid),
|
||||||
|
Contact\User::isIgnored($cid, $uid)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue